home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / QuickTimeComponents.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  168.8 KB  |  7,817 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QuickTimeComponents.a
  3. ;
  4. ;    Contains:    QuickTime Interfaces.
  5. ;
  6. ;    Version:    Technology:    QuickTime 2.0
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__QUICKTIMECOMPONENTS__') = 'UNDEFINED' THEN
  21. __QUICKTIMECOMPONENTS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  25.     include 'Components.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30.  
  31.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  32.     include 'ImageCompression.a'
  33.     ENDIF
  34. ;        include 'Quickdraw.a'                                        ;
  35. ;            include 'QuickdrawText.a'                                ;
  36. ;        include 'QDOffscreen.a'                                    ;
  37. ;            include 'Errors.a'                                        ;
  38. ;        include 'Windows.a'                                        ;
  39. ;            include 'Memory.a'                                        ;
  40. ;            include 'Events.a'                                        ;
  41. ;                include 'OSUtils.a'                                ;
  42. ;            include 'Controls.a'                                    ;
  43. ;                include 'Menus.a'                                    ;
  44. ;        include 'StandardFile.a'                                    ;
  45. ;            include 'Dialogs.a'                                    ;
  46. ;                include 'TextEdit.a'                                ;
  47. ;            include 'Files.a'                                        ;
  48. ;                include 'Finder.a'                                    ;
  49.  
  50.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  51.     include 'Movies.a'
  52.     ENDIF
  53. ;        include 'Aliases.a'                                        ;
  54. ;            include 'AppleTalk.a'                                    ;
  55.  
  56.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  57.     include 'Quickdraw.a'
  58.     ENDIF
  59.  
  60.     IF &TYPE('__VIDEO__') = 'UNDEFINED' THEN
  61.     include 'Video.a'
  62.     ENDIF
  63.  
  64.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  65.     include 'Memory.a'
  66.     ENDIF
  67.  
  68. clockComponentType                EQU        'clok'
  69. systemTickClock                    EQU        'tick'                ; subtype: 60ths since boot        
  70. systemSecondClock                EQU        'seco'                ; subtype: seconds since 1904        
  71. systemMillisecondClock            EQU        'mill'                ; subtype: 1000ths since boot        
  72. systemMicrosecondClock            EQU        'micr'
  73.  
  74. kClockRateIsLinear                EQU        1
  75. kClockImplementsCallBacks        EQU        2
  76.  
  77. ;* These are Clock procedures *
  78. ;
  79. ; pascal ComponentResult ClockGetTime(ComponentInstance aClock, TimeRecord *out)
  80. ;
  81.     IF ¬ GENERATINGCFM THEN
  82.         Macro
  83.         _ClockGetTime
  84.             dc.w     $2F3C
  85.             dc.w     $0004
  86.             dc.w     $0001
  87.             moveq    #0,d0
  88.             dc.w     $A82A
  89.         EndM
  90.     ELSE
  91.         IMPORT_CFM_FUNCTION    ClockGetTime
  92.     ENDIF
  93.  
  94. ;
  95. ; pascal QTCallBack ClockNewCallBack(ComponentInstance aClock, TimeBase tb, short callBackType)
  96. ;
  97.     IF ¬ GENERATINGCFM THEN
  98.         Macro
  99.         _ClockNewCallBack
  100.             dc.w     $2F3C
  101.             dc.w     $0006
  102.             dc.w     $0002
  103.             moveq    #0,d0
  104.             dc.w     $A82A
  105.         EndM
  106.     ELSE
  107.         IMPORT_CFM_FUNCTION    ClockNewCallBack
  108.     ENDIF
  109.  
  110. ;
  111. ; pascal ComponentResult ClockDisposeCallBack(ComponentInstance aClock, QTCallBack cb)
  112. ;
  113.     IF ¬ GENERATINGCFM THEN
  114.         Macro
  115.         _ClockDisposeCallBack
  116.             dc.w     $2F3C
  117.             dc.w     $0004
  118.             dc.w     $0003
  119.             moveq    #0,d0
  120.             dc.w     $A82A
  121.         EndM
  122.     ELSE
  123.         IMPORT_CFM_FUNCTION    ClockDisposeCallBack
  124.     ENDIF
  125.  
  126. ;
  127. ; pascal ComponentResult ClockCallMeWhen(ComponentInstance aClock, QTCallBack cb, long param1, long param2, long param3)
  128. ;
  129.     IF ¬ GENERATINGCFM THEN
  130.         Macro
  131.         _ClockCallMeWhen
  132.             dc.w     $2F3C
  133.             dc.w     $0010
  134.             dc.w     $0004
  135.             moveq    #0,d0
  136.             dc.w     $A82A
  137.         EndM
  138.     ELSE
  139.         IMPORT_CFM_FUNCTION    ClockCallMeWhen
  140.     ENDIF
  141.  
  142. ;
  143. ; pascal ComponentResult ClockCancelCallBack(ComponentInstance aClock, QTCallBack cb)
  144. ;
  145.     IF ¬ GENERATINGCFM THEN
  146.         Macro
  147.         _ClockCancelCallBack
  148.             dc.w     $2F3C
  149.             dc.w     $0004
  150.             dc.w     $0005
  151.             moveq    #0,d0
  152.             dc.w     $A82A
  153.         EndM
  154.     ELSE
  155.         IMPORT_CFM_FUNCTION    ClockCancelCallBack
  156.     ENDIF
  157.  
  158. ;
  159. ; pascal ComponentResult ClockRateChanged(ComponentInstance aClock, QTCallBack cb)
  160. ;
  161.     IF ¬ GENERATINGCFM THEN
  162.         Macro
  163.         _ClockRateChanged
  164.             dc.w     $2F3C
  165.             dc.w     $0004
  166.             dc.w     $0006
  167.             moveq    #0,d0
  168.             dc.w     $A82A
  169.         EndM
  170.     ELSE
  171.         IMPORT_CFM_FUNCTION    ClockRateChanged
  172.     ENDIF
  173.  
  174. ;
  175. ; pascal ComponentResult ClockTimeChanged(ComponentInstance aClock, QTCallBack cb)
  176. ;
  177.     IF ¬ GENERATINGCFM THEN
  178.         Macro
  179.         _ClockTimeChanged
  180.             dc.w     $2F3C
  181.             dc.w     $0004
  182.             dc.w     $0007
  183.             moveq    #0,d0
  184.             dc.w     $A82A
  185.         EndM
  186.     ELSE
  187.         IMPORT_CFM_FUNCTION    ClockTimeChanged
  188.     ENDIF
  189.  
  190. ;
  191. ; pascal ComponentResult ClockSetTimeBase(ComponentInstance aClock, TimeBase tb)
  192. ;
  193.     IF ¬ GENERATINGCFM THEN
  194.         Macro
  195.         _ClockSetTimeBase
  196.             dc.w     $2F3C
  197.             dc.w     $0004
  198.             dc.w     $0008
  199.             moveq    #0,d0
  200.             dc.w     $A82A
  201.         EndM
  202.     ELSE
  203.         IMPORT_CFM_FUNCTION    ClockSetTimeBase
  204.     ENDIF
  205.  
  206. ;
  207. ; pascal ComponentResult ClockStartStopChanged(ComponentInstance aClock, QTCallBack cb, Boolean startChanged, Boolean stopChanged)
  208. ;
  209.     IF ¬ GENERATINGCFM THEN
  210.         Macro
  211.         _ClockStartStopChanged
  212.             dc.w     $2F3C
  213.             dc.w     $0008
  214.             dc.w     $0009
  215.             moveq    #0,d0
  216.             dc.w     $A82A
  217.         EndM
  218.     ELSE
  219.         IMPORT_CFM_FUNCTION    ClockStartStopChanged
  220.     ENDIF
  221.  
  222. ;
  223. ; pascal ComponentResult ClockGetRate(ComponentInstance aClock, Fixed *rate)
  224. ;
  225.     IF ¬ GENERATINGCFM THEN
  226.         Macro
  227.         _ClockGetRate
  228.             dc.w     $2F3C
  229.             dc.w     $0004
  230.             dc.w     $000A
  231.             moveq    #0,d0
  232.             dc.w     $A82A
  233.         EndM
  234.     ELSE
  235.         IMPORT_CFM_FUNCTION    ClockGetRate
  236.     ENDIF
  237.  
  238. kClockGetTimeSelect                EQU        $1
  239. kClockNewCallBackSelect            EQU        $2
  240. kClockDisposeCallBackSelect        EQU        $3
  241. kClockCallMeWhenSelect            EQU        $4
  242. kClockCancelCallBackSelect        EQU        $5
  243. kClockRateChangedSelect            EQU        $6
  244. kClockTimeChangedSelect            EQU        $7
  245. kClockSetTimeBaseSelect            EQU        $8
  246. kClockStartStopChangedSelect    EQU        $9
  247. kClockGetRateSelect                EQU        $A
  248.  
  249. ;
  250. ;    General Sequence Grab stuff
  251. ;
  252. ; typedef ComponentInstance  SeqGrabComponent
  253. ; typedef ComponentInstance  SGChannel
  254.  
  255. SeqGrabComponentType            EQU        'barg'
  256. SeqGrabChannelType                EQU        'sgch'
  257. SeqGrabPanelType                EQU        'sgpn'
  258. SeqGrabCompressionPanelType        EQU        'comp'
  259. SeqGrabSourcePanelType            EQU        'sour'
  260.  
  261. seqGrabToDisk                    EQU        1
  262. seqGrabToMemory                    EQU        2
  263. seqGrabDontUseTempMemory        EQU        4
  264. seqGrabAppendToFile                EQU        8
  265. seqGrabDontAddMovieResource        EQU        16
  266. seqGrabDontMakeMovie            EQU        32
  267. seqGrabPreExtendFile            EQU        64
  268. seqGrabDataProcIsInterruptSafe    EQU        128
  269. seqGrabDataProcDoesOverlappingReads EQU        256
  270.  
  271. ; typedef unsigned long     SeqGrabDataOutputEnum
  272.  
  273. seqGrabRecord                    EQU        1
  274. seqGrabPreview                    EQU        2
  275. seqGrabPlayDuringRecord            EQU        4
  276.  
  277. ; typedef unsigned long     SeqGrabUsageEnum
  278.  
  279. seqGrabHasBounds                EQU        1
  280. seqGrabHasVolume                EQU        2
  281. seqGrabHasDiscreteSamples        EQU        4
  282.  
  283. ; typedef unsigned long     SeqGrabChannelInfoEnum
  284. SeqGrabFrameInfo         RECORD    0
  285. frameOffset                 ds.l   1        ; offset: $0 (0)
  286. frameTime                 ds.l   1        ; offset: $4 (4)
  287. frameSize                 ds.l   1        ; offset: $8 (8)
  288. frameChannel             ds.l   1        ; offset: $C (12)
  289. frameRefCon                 ds.l   1        ; offset: $10 (16)
  290. sizeof                     EQU *            ; size:   $14 (20)
  291.                         ENDR
  292.  
  293. ; typedef struct SeqGrabFrameInfo  SeqGrabFrameInfo, *SeqGrabFrameInfoPtr
  294.  
  295. grabPictOffScreen                EQU        1
  296. grabPictIgnoreClip                EQU        2
  297. grabPictCurrentImage            EQU        4
  298.  
  299. sgFlagControlledGrab            EQU        (1 << 0)
  300.  
  301. SGDeviceName             RECORD    0
  302. name                     ds.l   16        ; offset: $0 (0)
  303. icon                     ds.l   1        ; offset: $40 (64)
  304. flags                     ds.l   1        ; offset: $44 (68)
  305. refCon                     ds.l   1        ; offset: $48 (72)
  306. reserved                 ds.l   1        ; offset: $4C (76)        ; zero
  307. sizeof                     EQU *            ; size:   $50 (80)
  308.                         ENDR
  309.  
  310. ; typedef struct SGDeviceName  SGDeviceName
  311.  
  312. sgDeviceNameFlagDeviceUnavailable EQU        (1 << 0)
  313.  
  314. SGDeviceListRecord         RECORD    0
  315. count                     ds.w   1        ; offset: $0 (0)
  316. selectedIndex             ds.w   1        ; offset: $2 (2)
  317. reserved                 ds.l   1        ; offset: $4 (4)        ; zero
  318. entry                     ds     SGDeviceName ; offset: $8 (8)
  319. sizeof                     EQU *            ; size:   $58 (88)
  320.                         ENDR
  321.  
  322. ; typedef struct SGDeviceListRecord  SGDeviceListRecord, *SGDeviceListPtr, **SGDeviceList
  323.  
  324. sgDeviceListWithIcons            EQU        (1 << 0)
  325. sgDeviceListDontCheckAvailability EQU        (1 << 1)
  326.  
  327. seqGrabWriteAppend                EQU        0
  328. seqGrabWriteReserve                EQU        1
  329. seqGrabWriteFill                EQU        2
  330.  
  331. seqGrabUnpause                    EQU        0
  332. seqGrabPause                    EQU        1
  333. seqGrabPauseForMenu                EQU        3
  334.  
  335. channelFlagDontOpenResFile        EQU        2
  336. channelFlagHasDependency        EQU        4
  337.  
  338. sgPanelFlagForPanel                EQU        1
  339.  
  340. SGOutputRecord             RECORD    0
  341. data                     ds.l   1        ; offset: $0 (0)
  342. sizeof                     EQU *            ; size:   $4 (4)
  343.                         ENDR
  344.  
  345. ; typedef struct SGOutputRecord  SGOutputRecord, *SGOutput
  346.  
  347. channelPlayNormal                EQU        0
  348. channelPlayFast                    EQU        1
  349. channelPlayHighQuality            EQU        2
  350. channelPlayAllData                EQU        4
  351.  
  352. ;
  353. ; pascal ComponentResult SGInitialize(SeqGrabComponent s)
  354. ;
  355.     IF ¬ GENERATINGCFM THEN
  356.         Macro
  357.         _SGInitialize
  358.             dc.w     $2F3C
  359.             dc.w     $0000
  360.             dc.w     $0001
  361.             moveq    #0,d0
  362.             dc.w     $A82A
  363.         EndM
  364.     ELSE
  365.         IMPORT_CFM_FUNCTION    SGInitialize
  366.     ENDIF
  367.  
  368. ;
  369. ; pascal ComponentResult SGSetDataOutput(SeqGrabComponent s, const FSSpec *movieFile, long whereFlags)
  370. ;
  371.     IF ¬ GENERATINGCFM THEN
  372.         Macro
  373.         _SGSetDataOutput
  374.             dc.w     $2F3C
  375.             dc.w     $0008
  376.             dc.w     $0002
  377.             moveq    #0,d0
  378.             dc.w     $A82A
  379.         EndM
  380.     ELSE
  381.         IMPORT_CFM_FUNCTION    SGSetDataOutput
  382.     ENDIF
  383.  
  384. ;
  385. ; pascal ComponentResult SGGetDataOutput(SeqGrabComponent s, FSSpec *movieFile, long *whereFlags)
  386. ;
  387.     IF ¬ GENERATINGCFM THEN
  388.         Macro
  389.         _SGGetDataOutput
  390.             dc.w     $2F3C
  391.             dc.w     $0008
  392.             dc.w     $0003
  393.             moveq    #0,d0
  394.             dc.w     $A82A
  395.         EndM
  396.     ELSE
  397.         IMPORT_CFM_FUNCTION    SGGetDataOutput
  398.     ENDIF
  399.  
  400. ;
  401. ; pascal ComponentResult SGSetGWorld(SeqGrabComponent s, CGrafPtr gp, GDHandle gd)
  402. ;
  403.     IF ¬ GENERATINGCFM THEN
  404.         Macro
  405.         _SGSetGWorld
  406.             dc.w     $2F3C
  407.             dc.w     $0008
  408.             dc.w     $0004
  409.             moveq    #0,d0
  410.             dc.w     $A82A
  411.         EndM
  412.     ELSE
  413.         IMPORT_CFM_FUNCTION    SGSetGWorld
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal ComponentResult SGGetGWorld(SeqGrabComponent s, CGrafPtr *gp, GDHandle *gd)
  418. ;
  419.     IF ¬ GENERATINGCFM THEN
  420.         Macro
  421.         _SGGetGWorld
  422.             dc.w     $2F3C
  423.             dc.w     $0008
  424.             dc.w     $0005
  425.             moveq    #0,d0
  426.             dc.w     $A82A
  427.         EndM
  428.     ELSE
  429.         IMPORT_CFM_FUNCTION    SGGetGWorld
  430.     ENDIF
  431.  
  432. ;
  433. ; pascal ComponentResult SGNewChannel(SeqGrabComponent s, OSType channelType, SGChannel *ref)
  434. ;
  435.     IF ¬ GENERATINGCFM THEN
  436.         Macro
  437.         _SGNewChannel
  438.             dc.w     $2F3C
  439.             dc.w     $0008
  440.             dc.w     $0006
  441.             moveq    #0,d0
  442.             dc.w     $A82A
  443.         EndM
  444.     ELSE
  445.         IMPORT_CFM_FUNCTION    SGNewChannel
  446.     ENDIF
  447.  
  448. ;
  449. ; pascal ComponentResult SGDisposeChannel(SeqGrabComponent s, SGChannel c)
  450. ;
  451.     IF ¬ GENERATINGCFM THEN
  452.         Macro
  453.         _SGDisposeChannel
  454.             dc.w     $2F3C
  455.             dc.w     $0004
  456.             dc.w     $0007
  457.             moveq    #0,d0
  458.             dc.w     $A82A
  459.         EndM
  460.     ELSE
  461.         IMPORT_CFM_FUNCTION    SGDisposeChannel
  462.     ENDIF
  463.  
  464. ;
  465. ; pascal ComponentResult SGStartPreview(SeqGrabComponent s)
  466. ;
  467.     IF ¬ GENERATINGCFM THEN
  468.         Macro
  469.         _SGStartPreview
  470.             dc.w     $2F3C
  471.             dc.w     $0000
  472.             dc.w     $0010
  473.             moveq    #0,d0
  474.             dc.w     $A82A
  475.         EndM
  476.     ELSE
  477.         IMPORT_CFM_FUNCTION    SGStartPreview
  478.     ENDIF
  479.  
  480. ;
  481. ; pascal ComponentResult SGStartRecord(SeqGrabComponent s)
  482. ;
  483.     IF ¬ GENERATINGCFM THEN
  484.         Macro
  485.         _SGStartRecord
  486.             dc.w     $2F3C
  487.             dc.w     $0000
  488.             dc.w     $0011
  489.             moveq    #0,d0
  490.             dc.w     $A82A
  491.         EndM
  492.     ELSE
  493.         IMPORT_CFM_FUNCTION    SGStartRecord
  494.     ENDIF
  495.  
  496. ;
  497. ; pascal ComponentResult SGIdle(SeqGrabComponent s)
  498. ;
  499.     IF ¬ GENERATINGCFM THEN
  500.         Macro
  501.         _SGIdle
  502.             dc.w     $2F3C
  503.             dc.w     $0000
  504.             dc.w     $0012
  505.             moveq    #0,d0
  506.             dc.w     $A82A
  507.         EndM
  508.     ELSE
  509.         IMPORT_CFM_FUNCTION    SGIdle
  510.     ENDIF
  511.  
  512. ;
  513. ; pascal ComponentResult SGStop(SeqGrabComponent s)
  514. ;
  515.     IF ¬ GENERATINGCFM THEN
  516.         Macro
  517.         _SGStop
  518.             dc.w     $2F3C
  519.             dc.w     $0000
  520.             dc.w     $0013
  521.             moveq    #0,d0
  522.             dc.w     $A82A
  523.         EndM
  524.     ELSE
  525.         IMPORT_CFM_FUNCTION    SGStop
  526.     ENDIF
  527.  
  528. ;
  529. ; pascal ComponentResult SGPause(SeqGrabComponent s, Byte pause)
  530. ;
  531.     IF ¬ GENERATINGCFM THEN
  532.         Macro
  533.         _SGPause
  534.             dc.w     $2F3C
  535.             dc.w     $0002
  536.             dc.w     $0014
  537.             moveq    #0,d0
  538.             dc.w     $A82A
  539.         EndM
  540.     ELSE
  541.         IMPORT_CFM_FUNCTION    SGPause
  542.     ENDIF
  543.  
  544. ;
  545. ; pascal ComponentResult SGPrepare(SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord)
  546. ;
  547.     IF ¬ GENERATINGCFM THEN
  548.         Macro
  549.         _SGPrepare
  550.             dc.w     $2F3C
  551.             dc.w     $0004
  552.             dc.w     $0015
  553.             moveq    #0,d0
  554.             dc.w     $A82A
  555.         EndM
  556.     ELSE
  557.         IMPORT_CFM_FUNCTION    SGPrepare
  558.     ENDIF
  559.  
  560. ;
  561. ; pascal ComponentResult SGRelease(SeqGrabComponent s)
  562. ;
  563.     IF ¬ GENERATINGCFM THEN
  564.         Macro
  565.         _SGRelease
  566.             dc.w     $2F3C
  567.             dc.w     $0000
  568.             dc.w     $0016
  569.             moveq    #0,d0
  570.             dc.w     $A82A
  571.         EndM
  572.     ELSE
  573.         IMPORT_CFM_FUNCTION    SGRelease
  574.     ENDIF
  575.  
  576. ;
  577. ; pascal Movie SGGetMovie(SeqGrabComponent s)
  578. ;
  579.     IF ¬ GENERATINGCFM THEN
  580.         Macro
  581.         _SGGetMovie
  582.             dc.w     $2F3C
  583.             dc.w     $0000
  584.             dc.w     $0017
  585.             moveq    #0,d0
  586.             dc.w     $A82A
  587.         EndM
  588.     ELSE
  589.         IMPORT_CFM_FUNCTION    SGGetMovie
  590.     ENDIF
  591.  
  592. ;
  593. ; pascal ComponentResult SGSetMaximumRecordTime(SeqGrabComponent s, unsigned long ticks)
  594. ;
  595.     IF ¬ GENERATINGCFM THEN
  596.         Macro
  597.         _SGSetMaximumRecordTime
  598.             dc.w     $2F3C
  599.             dc.w     $0004
  600.             dc.w     $0018
  601.             moveq    #0,d0
  602.             dc.w     $A82A
  603.         EndM
  604.     ELSE
  605.         IMPORT_CFM_FUNCTION    SGSetMaximumRecordTime
  606.     ENDIF
  607.  
  608. ;
  609. ; pascal ComponentResult SGGetMaximumRecordTime(SeqGrabComponent s, unsigned long *ticks)
  610. ;
  611.     IF ¬ GENERATINGCFM THEN
  612.         Macro
  613.         _SGGetMaximumRecordTime
  614.             dc.w     $2F3C
  615.             dc.w     $0004
  616.             dc.w     $0019
  617.             moveq    #0,d0
  618.             dc.w     $A82A
  619.         EndM
  620.     ELSE
  621.         IMPORT_CFM_FUNCTION    SGGetMaximumRecordTime
  622.     ENDIF
  623.  
  624. ;
  625. ; pascal ComponentResult SGGetStorageSpaceRemaining(SeqGrabComponent s, unsigned long *bytes)
  626. ;
  627.     IF ¬ GENERATINGCFM THEN
  628.         Macro
  629.         _SGGetStorageSpaceRemaining
  630.             dc.w     $2F3C
  631.             dc.w     $0004
  632.             dc.w     $001A
  633.             moveq    #0,d0
  634.             dc.w     $A82A
  635.         EndM
  636.     ELSE
  637.         IMPORT_CFM_FUNCTION    SGGetStorageSpaceRemaining
  638.     ENDIF
  639.  
  640. ;
  641. ; pascal ComponentResult SGGetTimeRemaining(SeqGrabComponent s, long *ticksLeft)
  642. ;
  643.     IF ¬ GENERATINGCFM THEN
  644.         Macro
  645.         _SGGetTimeRemaining
  646.             dc.w     $2F3C
  647.             dc.w     $0004
  648.             dc.w     $001B
  649.             moveq    #0,d0
  650.             dc.w     $A82A
  651.         EndM
  652.     ELSE
  653.         IMPORT_CFM_FUNCTION    SGGetTimeRemaining
  654.     ENDIF
  655.  
  656. ;
  657. ; pascal ComponentResult SGGrabPict(SeqGrabComponent s, PicHandle *p, const Rect *bounds, short offscreenDepth, long grabPictFlags)
  658. ;
  659.     IF ¬ GENERATINGCFM THEN
  660.         Macro
  661.         _SGGrabPict
  662.             dc.w     $2F3C
  663.             dc.w     $000E
  664.             dc.w     $001C
  665.             moveq    #0,d0
  666.             dc.w     $A82A
  667.         EndM
  668.     ELSE
  669.         IMPORT_CFM_FUNCTION    SGGrabPict
  670.     ENDIF
  671.  
  672. ;
  673. ; pascal ComponentResult SGGetLastMovieResID(SeqGrabComponent s, short *resID)
  674. ;
  675.     IF ¬ GENERATINGCFM THEN
  676.         Macro
  677.         _SGGetLastMovieResID
  678.             dc.w     $2F3C
  679.             dc.w     $0004
  680.             dc.w     $001D
  681.             moveq    #0,d0
  682.             dc.w     $A82A
  683.         EndM
  684.     ELSE
  685.         IMPORT_CFM_FUNCTION    SGGetLastMovieResID
  686.     ENDIF
  687.  
  688. ;
  689. ; pascal ComponentResult SGSetFlags(SeqGrabComponent s, long sgFlags)
  690. ;
  691.     IF ¬ GENERATINGCFM THEN
  692.         Macro
  693.         _SGSetFlags
  694.             dc.w     $2F3C
  695.             dc.w     $0004
  696.             dc.w     $001E
  697.             moveq    #0,d0
  698.             dc.w     $A82A
  699.         EndM
  700.     ELSE
  701.         IMPORT_CFM_FUNCTION    SGSetFlags
  702.     ENDIF
  703.  
  704. ;
  705. ; pascal ComponentResult SGGetFlags(SeqGrabComponent s, long *sgFlags)
  706. ;
  707.     IF ¬ GENERATINGCFM THEN
  708.         Macro
  709.         _SGGetFlags
  710.             dc.w     $2F3C
  711.             dc.w     $0004
  712.             dc.w     $001F
  713.             moveq    #0,d0
  714.             dc.w     $A82A
  715.         EndM
  716.     ELSE
  717.         IMPORT_CFM_FUNCTION    SGGetFlags
  718.     ENDIF
  719.  
  720. ;
  721. ; pascal ComponentResult SGSetDataProc(SeqGrabComponent s, SGDataUPP proc, long refCon)
  722. ;
  723.     IF ¬ GENERATINGCFM THEN
  724.         Macro
  725.         _SGSetDataProc
  726.             dc.w     $2F3C
  727.             dc.w     $0008
  728.             dc.w     $0020
  729.             moveq    #0,d0
  730.             dc.w     $A82A
  731.         EndM
  732.     ELSE
  733.         IMPORT_CFM_FUNCTION    SGSetDataProc
  734.     ENDIF
  735.  
  736. ;
  737. ; pascal ComponentResult SGNewChannelFromComponent(SeqGrabComponent s, SGChannel *newChannel, Component sgChannelComponent)
  738. ;
  739.     IF ¬ GENERATINGCFM THEN
  740.         Macro
  741.         _SGNewChannelFromComponent
  742.             dc.w     $2F3C
  743.             dc.w     $0008
  744.             dc.w     $0021
  745.             moveq    #0,d0
  746.             dc.w     $A82A
  747.         EndM
  748.     ELSE
  749.         IMPORT_CFM_FUNCTION    SGNewChannelFromComponent
  750.     ENDIF
  751.  
  752. ;
  753. ; pascal ComponentResult SGDisposeDeviceList(SeqGrabComponent s, SGDeviceList list)
  754. ;
  755.     IF ¬ GENERATINGCFM THEN
  756.         Macro
  757.         _SGDisposeDeviceList
  758.             dc.w     $2F3C
  759.             dc.w     $0004
  760.             dc.w     $0022
  761.             moveq    #0,d0
  762.             dc.w     $A82A
  763.         EndM
  764.     ELSE
  765.         IMPORT_CFM_FUNCTION    SGDisposeDeviceList
  766.     ENDIF
  767.  
  768. ;
  769. ; pascal ComponentResult SGAppendDeviceListToMenu(SeqGrabComponent s, SGDeviceList list, MenuHandle mh)
  770. ;
  771.     IF ¬ GENERATINGCFM THEN
  772.         Macro
  773.         _SGAppendDeviceListToMenu
  774.             dc.w     $2F3C
  775.             dc.w     $0008
  776.             dc.w     $0023
  777.             moveq    #0,d0
  778.             dc.w     $A82A
  779.         EndM
  780.     ELSE
  781.         IMPORT_CFM_FUNCTION    SGAppendDeviceListToMenu
  782.     ENDIF
  783.  
  784. ;
  785. ; pascal ComponentResult SGSetSettings(SeqGrabComponent s, UserData ud, long flags)
  786. ;
  787.     IF ¬ GENERATINGCFM THEN
  788.         Macro
  789.         _SGSetSettings
  790.             dc.w     $2F3C
  791.             dc.w     $0008
  792.             dc.w     $0024
  793.             moveq    #0,d0
  794.             dc.w     $A82A
  795.         EndM
  796.     ELSE
  797.         IMPORT_CFM_FUNCTION    SGSetSettings
  798.     ENDIF
  799.  
  800. ;
  801. ; pascal ComponentResult SGGetSettings(SeqGrabComponent s, UserData *ud, long flags)
  802. ;
  803.     IF ¬ GENERATINGCFM THEN
  804.         Macro
  805.         _SGGetSettings
  806.             dc.w     $2F3C
  807.             dc.w     $0008
  808.             dc.w     $0025
  809.             moveq    #0,d0
  810.             dc.w     $A82A
  811.         EndM
  812.     ELSE
  813.         IMPORT_CFM_FUNCTION    SGGetSettings
  814.     ENDIF
  815.  
  816. ;
  817. ; pascal ComponentResult SGGetIndChannel(SeqGrabComponent s, short index, SGChannel *ref, OSType *chanType)
  818. ;
  819.     IF ¬ GENERATINGCFM THEN
  820.         Macro
  821.         _SGGetIndChannel
  822.             dc.w     $2F3C
  823.             dc.w     $000A
  824.             dc.w     $0026
  825.             moveq    #0,d0
  826.             dc.w     $A82A
  827.         EndM
  828.     ELSE
  829.         IMPORT_CFM_FUNCTION    SGGetIndChannel
  830.     ENDIF
  831.  
  832. ;
  833. ; pascal ComponentResult SGUpdate(SeqGrabComponent s, RgnHandle updateRgn)
  834. ;
  835.     IF ¬ GENERATINGCFM THEN
  836.         Macro
  837.         _SGUpdate
  838.             dc.w     $2F3C
  839.             dc.w     $0004
  840.             dc.w     $0027
  841.             moveq    #0,d0
  842.             dc.w     $A82A
  843.         EndM
  844.     ELSE
  845.         IMPORT_CFM_FUNCTION    SGUpdate
  846.     ENDIF
  847.  
  848. ;
  849. ; pascal ComponentResult SGGetPause(SeqGrabComponent s, Byte *paused)
  850. ;
  851.     IF ¬ GENERATINGCFM THEN
  852.         Macro
  853.         _SGGetPause
  854.             dc.w     $2F3C
  855.             dc.w     $0004
  856.             dc.w     $0028
  857.             moveq    #0,d0
  858.             dc.w     $A82A
  859.         EndM
  860.     ELSE
  861.         IMPORT_CFM_FUNCTION    SGGetPause
  862.     ENDIF
  863.  
  864. ;
  865. ; pascal ComponentResult SGSettingsDialog(SeqGrabComponent s, SGChannel c, short numPanels, Component *panelList, long flags, SGModalFilterUPP proc, long procRefNum)
  866. ;
  867.     IF ¬ GENERATINGCFM THEN
  868.         Macro
  869.         _SGSettingsDialog
  870.             dc.w     $2F3C
  871.             dc.w     $0016
  872.             dc.w     $0029
  873.             moveq    #0,d0
  874.             dc.w     $A82A
  875.         EndM
  876.     ELSE
  877.         IMPORT_CFM_FUNCTION    SGSettingsDialog
  878.     ENDIF
  879.  
  880. ;
  881. ; pascal ComponentResult SGGetAlignmentProc(SeqGrabComponent s, ICMAlignmentProcRecordPtr alignmentProc)
  882. ;
  883.     IF ¬ GENERATINGCFM THEN
  884.         Macro
  885.         _SGGetAlignmentProc
  886.             dc.w     $2F3C
  887.             dc.w     $0004
  888.             dc.w     $002A
  889.             moveq    #0,d0
  890.             dc.w     $A82A
  891.         EndM
  892.     ELSE
  893.         IMPORT_CFM_FUNCTION    SGGetAlignmentProc
  894.     ENDIF
  895.  
  896. ;
  897. ; pascal ComponentResult SGSetChannelSettings(SeqGrabComponent s, SGChannel c, UserData ud, long flags)
  898. ;
  899.     IF ¬ GENERATINGCFM THEN
  900.         Macro
  901.         _SGSetChannelSettings
  902.             dc.w     $2F3C
  903.             dc.w     $000C
  904.             dc.w     $002B
  905.             moveq    #0,d0
  906.             dc.w     $A82A
  907.         EndM
  908.     ELSE
  909.         IMPORT_CFM_FUNCTION    SGSetChannelSettings
  910.     ENDIF
  911.  
  912. ;
  913. ; pascal ComponentResult SGGetChannelSettings(SeqGrabComponent s, SGChannel c, UserData *ud, long flags)
  914. ;
  915.     IF ¬ GENERATINGCFM THEN
  916.         Macro
  917.         _SGGetChannelSettings
  918.             dc.w     $2F3C
  919.             dc.w     $000C
  920.             dc.w     $002C
  921.             moveq    #0,d0
  922.             dc.w     $A82A
  923.         EndM
  924.     ELSE
  925.         IMPORT_CFM_FUNCTION    SGGetChannelSettings
  926.     ENDIF
  927.  
  928. ;
  929. ; pascal ComponentResult SGGetMode(SeqGrabComponent s, Boolean *previewMode, Boolean *recordMode)
  930. ;
  931.     IF ¬ GENERATINGCFM THEN
  932.         Macro
  933.         _SGGetMode
  934.             dc.w     $2F3C
  935.             dc.w     $0008
  936.             dc.w     $002D
  937.             moveq    #0,d0
  938.             dc.w     $A82A
  939.         EndM
  940.     ELSE
  941.         IMPORT_CFM_FUNCTION    SGGetMode
  942.     ENDIF
  943.  
  944. ;
  945. ; pascal ComponentResult SGSetDataRef(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags)
  946. ;
  947.     IF ¬ GENERATINGCFM THEN
  948.         Macro
  949.         _SGSetDataRef
  950.             dc.w     $2F3C
  951.             dc.w     $000C
  952.             dc.w     $002E
  953.             moveq    #0,d0
  954.             dc.w     $A82A
  955.         EndM
  956.     ELSE
  957.         IMPORT_CFM_FUNCTION    SGSetDataRef
  958.     ENDIF
  959.  
  960. ;
  961. ; pascal ComponentResult SGGetDataRef(SeqGrabComponent s, Handle *dataRef, OSType *dataRefType, long *whereFlags)
  962. ;
  963.     IF ¬ GENERATINGCFM THEN
  964.         Macro
  965.         _SGGetDataRef
  966.             dc.w     $2F3C
  967.             dc.w     $000C
  968.             dc.w     $002F
  969.             moveq    #0,d0
  970.             dc.w     $A82A
  971.         EndM
  972.     ELSE
  973.         IMPORT_CFM_FUNCTION    SGGetDataRef
  974.     ENDIF
  975.  
  976. ;
  977. ; pascal ComponentResult SGNewOutput(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags, SGOutput *output)
  978. ;
  979.     IF ¬ GENERATINGCFM THEN
  980.         Macro
  981.         _SGNewOutput
  982.             dc.w     $2F3C
  983.             dc.w     $0010
  984.             dc.w     $0030
  985.             moveq    #0,d0
  986.             dc.w     $A82A
  987.         EndM
  988.     ELSE
  989.         IMPORT_CFM_FUNCTION    SGNewOutput
  990.     ENDIF
  991.  
  992. ;
  993. ; pascal ComponentResult SGDisposeOutput(SeqGrabComponent s, SGOutput output)
  994. ;
  995.     IF ¬ GENERATINGCFM THEN
  996.         Macro
  997.         _SGDisposeOutput
  998.             dc.w     $2F3C
  999.             dc.w     $0004
  1000.             dc.w     $0031
  1001.             moveq    #0,d0
  1002.             dc.w     $A82A
  1003.         EndM
  1004.     ELSE
  1005.         IMPORT_CFM_FUNCTION    SGDisposeOutput
  1006.     ENDIF
  1007.  
  1008. ;
  1009. ; pascal ComponentResult SGSetOutputFlags(SeqGrabComponent s, SGOutput output, long whereFlags)
  1010. ;
  1011.     IF ¬ GENERATINGCFM THEN
  1012.         Macro
  1013.         _SGSetOutputFlags
  1014.             dc.w     $2F3C
  1015.             dc.w     $0008
  1016.             dc.w     $0032
  1017.             moveq    #0,d0
  1018.             dc.w     $A82A
  1019.         EndM
  1020.     ELSE
  1021.         IMPORT_CFM_FUNCTION    SGSetOutputFlags
  1022.     ENDIF
  1023.  
  1024. ;
  1025. ; pascal ComponentResult SGSetChannelOutput(SeqGrabComponent s, SGChannel c, SGOutput output)
  1026. ;
  1027.     IF ¬ GENERATINGCFM THEN
  1028.         Macro
  1029.         _SGSetChannelOutput
  1030.             dc.w     $2F3C
  1031.             dc.w     $0008
  1032.             dc.w     $0033
  1033.             moveq    #0,d0
  1034.             dc.w     $A82A
  1035.         EndM
  1036.     ELSE
  1037.         IMPORT_CFM_FUNCTION    SGSetChannelOutput
  1038.     ENDIF
  1039.  
  1040. ;
  1041. ; pascal ComponentResult SGGetDataOutputStorageSpaceRemaining(SeqGrabComponent s, SGOutput output, unsigned long *space)
  1042. ;
  1043.     IF ¬ GENERATINGCFM THEN
  1044.         Macro
  1045.         _SGGetDataOutputStorageSpaceRemaining
  1046.             dc.w     $2F3C
  1047.             dc.w     $0008
  1048.             dc.w     $0034
  1049.             moveq    #0,d0
  1050.             dc.w     $A82A
  1051.         EndM
  1052.     ELSE
  1053.         IMPORT_CFM_FUNCTION    SGGetDataOutputStorageSpaceRemaining
  1054.     ENDIF
  1055.  
  1056. ;
  1057. ;    calls from Channel to seqGrab
  1058. ;
  1059. ;
  1060. ; pascal ComponentResult SGWriteMovieData(SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset)
  1061. ;
  1062.     IF ¬ GENERATINGCFM THEN
  1063.         Macro
  1064.         _SGWriteMovieData
  1065.             dc.w     $2F3C
  1066.             dc.w     $0010
  1067.             dc.w     $0100
  1068.             moveq    #0,d0
  1069.             dc.w     $A82A
  1070.         EndM
  1071.     ELSE
  1072.         IMPORT_CFM_FUNCTION    SGWriteMovieData
  1073.     ENDIF
  1074.  
  1075. ;
  1076. ; pascal ComponentResult SGAddFrameReference(SeqGrabComponent s, SeqGrabFrameInfoPtr frameInfo)
  1077. ;
  1078.     IF ¬ GENERATINGCFM THEN
  1079.         Macro
  1080.         _SGAddFrameReference
  1081.             dc.w     $2F3C
  1082.             dc.w     $0004
  1083.             dc.w     $0101
  1084.             moveq    #0,d0
  1085.             dc.w     $A82A
  1086.         EndM
  1087.     ELSE
  1088.         IMPORT_CFM_FUNCTION    SGAddFrameReference
  1089.     ENDIF
  1090.  
  1091. ;
  1092. ; pascal ComponentResult SGGetNextFrameReference(SeqGrabComponent s, SeqGrabFrameInfoPtr frameInfo, TimeValue *frameDuration, long *frameNumber)
  1093. ;
  1094.     IF ¬ GENERATINGCFM THEN
  1095.         Macro
  1096.         _SGGetNextFrameReference
  1097.             dc.w     $2F3C
  1098.             dc.w     $000C
  1099.             dc.w     $0102
  1100.             moveq    #0,d0
  1101.             dc.w     $A82A
  1102.         EndM
  1103.     ELSE
  1104.         IMPORT_CFM_FUNCTION    SGGetNextFrameReference
  1105.     ENDIF
  1106.  
  1107. ;
  1108. ; pascal ComponentResult SGGetTimeBase(SeqGrabComponent s, TimeBase *tb)
  1109. ;
  1110.     IF ¬ GENERATINGCFM THEN
  1111.         Macro
  1112.         _SGGetTimeBase
  1113.             dc.w     $2F3C
  1114.             dc.w     $0004
  1115.             dc.w     $0103
  1116.             moveq    #0,d0
  1117.             dc.w     $A82A
  1118.         EndM
  1119.     ELSE
  1120.         IMPORT_CFM_FUNCTION    SGGetTimeBase
  1121.     ENDIF
  1122.  
  1123. ;
  1124. ; pascal ComponentResult SGSortDeviceList(SeqGrabComponent s, SGDeviceList list)
  1125. ;
  1126.     IF ¬ GENERATINGCFM THEN
  1127.         Macro
  1128.         _SGSortDeviceList
  1129.             dc.w     $2F3C
  1130.             dc.w     $0004
  1131.             dc.w     $0104
  1132.             moveq    #0,d0
  1133.             dc.w     $A82A
  1134.         EndM
  1135.     ELSE
  1136.         IMPORT_CFM_FUNCTION    SGSortDeviceList
  1137.     ENDIF
  1138.  
  1139. ;
  1140. ; pascal ComponentResult SGAddMovieData(SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType)
  1141. ;
  1142.     IF ¬ GENERATINGCFM THEN
  1143.         Macro
  1144.         _SGAddMovieData
  1145.             dc.w     $2F3C
  1146.             dc.w     $001A
  1147.             dc.w     $0105
  1148.             moveq    #0,d0
  1149.             dc.w     $A82A
  1150.         EndM
  1151.     ELSE
  1152.         IMPORT_CFM_FUNCTION    SGAddMovieData
  1153.     ENDIF
  1154.  
  1155. ;
  1156. ; pascal ComponentResult SGChangedSource(SeqGrabComponent s, SGChannel c)
  1157. ;
  1158.     IF ¬ GENERATINGCFM THEN
  1159.         Macro
  1160.         _SGChangedSource
  1161.             dc.w     $2F3C
  1162.             dc.w     $0004
  1163.             dc.w     $0106
  1164.             moveq    #0,d0
  1165.             dc.w     $A82A
  1166.         EndM
  1167.     ELSE
  1168.         IMPORT_CFM_FUNCTION    SGChangedSource
  1169.     ENDIF
  1170.  
  1171. ;** Sequence Grab CHANNEL Component Stuff **
  1172. ;
  1173. ; pascal ComponentResult SGSetChannelUsage(SGChannel c, long usage)
  1174. ;
  1175.     IF ¬ GENERATINGCFM THEN
  1176.         Macro
  1177.         _SGSetChannelUsage
  1178.             dc.w     $2F3C
  1179.             dc.w     $0004
  1180.             dc.w     $0080
  1181.             moveq    #0,d0
  1182.             dc.w     $A82A
  1183.         EndM
  1184.     ELSE
  1185.         IMPORT_CFM_FUNCTION    SGSetChannelUsage
  1186.     ENDIF
  1187.  
  1188. ;
  1189. ; pascal ComponentResult SGGetChannelUsage(SGChannel c, long *usage)
  1190. ;
  1191.     IF ¬ GENERATINGCFM THEN
  1192.         Macro
  1193.         _SGGetChannelUsage
  1194.             dc.w     $2F3C
  1195.             dc.w     $0004
  1196.             dc.w     $0081
  1197.             moveq    #0,d0
  1198.             dc.w     $A82A
  1199.         EndM
  1200.     ELSE
  1201.         IMPORT_CFM_FUNCTION    SGGetChannelUsage
  1202.     ENDIF
  1203.  
  1204. ;
  1205. ; pascal ComponentResult SGSetChannelBounds(SGChannel c, const Rect *bounds)
  1206. ;
  1207.     IF ¬ GENERATINGCFM THEN
  1208.         Macro
  1209.         _SGSetChannelBounds
  1210.             dc.w     $2F3C
  1211.             dc.w     $0004
  1212.             dc.w     $0082
  1213.             moveq    #0,d0
  1214.             dc.w     $A82A
  1215.         EndM
  1216.     ELSE
  1217.         IMPORT_CFM_FUNCTION    SGSetChannelBounds
  1218.     ENDIF
  1219.  
  1220. ;
  1221. ; pascal ComponentResult SGGetChannelBounds(SGChannel c, Rect *bounds)
  1222. ;
  1223.     IF ¬ GENERATINGCFM THEN
  1224.         Macro
  1225.         _SGGetChannelBounds
  1226.             dc.w     $2F3C
  1227.             dc.w     $0004
  1228.             dc.w     $0083
  1229.             moveq    #0,d0
  1230.             dc.w     $A82A
  1231.         EndM
  1232.     ELSE
  1233.         IMPORT_CFM_FUNCTION    SGGetChannelBounds
  1234.     ENDIF
  1235.  
  1236. ;
  1237. ; pascal ComponentResult SGSetChannelVolume(SGChannel c, short volume)
  1238. ;
  1239.     IF ¬ GENERATINGCFM THEN
  1240.         Macro
  1241.         _SGSetChannelVolume
  1242.             dc.w     $2F3C
  1243.             dc.w     $0002
  1244.             dc.w     $0084
  1245.             moveq    #0,d0
  1246.             dc.w     $A82A
  1247.         EndM
  1248.     ELSE
  1249.         IMPORT_CFM_FUNCTION    SGSetChannelVolume
  1250.     ENDIF
  1251.  
  1252. ;
  1253. ; pascal ComponentResult SGGetChannelVolume(SGChannel c, short *volume)
  1254. ;
  1255.     IF ¬ GENERATINGCFM THEN
  1256.         Macro
  1257.         _SGGetChannelVolume
  1258.             dc.w     $2F3C
  1259.             dc.w     $0004
  1260.             dc.w     $0085
  1261.             moveq    #0,d0
  1262.             dc.w     $A82A
  1263.         EndM
  1264.     ELSE
  1265.         IMPORT_CFM_FUNCTION    SGGetChannelVolume
  1266.     ENDIF
  1267.  
  1268. ;
  1269. ; pascal ComponentResult SGGetChannelInfo(SGChannel c, long *channelInfo)
  1270. ;
  1271.     IF ¬ GENERATINGCFM THEN
  1272.         Macro
  1273.         _SGGetChannelInfo
  1274.             dc.w     $2F3C
  1275.             dc.w     $0004
  1276.             dc.w     $0086
  1277.             moveq    #0,d0
  1278.             dc.w     $A82A
  1279.         EndM
  1280.     ELSE
  1281.         IMPORT_CFM_FUNCTION    SGGetChannelInfo
  1282.     ENDIF
  1283.  
  1284. ;
  1285. ; pascal ComponentResult SGSetChannelPlayFlags(SGChannel c, long playFlags)
  1286. ;
  1287.     IF ¬ GENERATINGCFM THEN
  1288.         Macro
  1289.         _SGSetChannelPlayFlags
  1290.             dc.w     $2F3C
  1291.             dc.w     $0004
  1292.             dc.w     $0087
  1293.             moveq    #0,d0
  1294.             dc.w     $A82A
  1295.         EndM
  1296.     ELSE
  1297.         IMPORT_CFM_FUNCTION    SGSetChannelPlayFlags
  1298.     ENDIF
  1299.  
  1300. ;
  1301. ; pascal ComponentResult SGGetChannelPlayFlags(SGChannel c, long *playFlags)
  1302. ;
  1303.     IF ¬ GENERATINGCFM THEN
  1304.         Macro
  1305.         _SGGetChannelPlayFlags
  1306.             dc.w     $2F3C
  1307.             dc.w     $0004
  1308.             dc.w     $0088
  1309.             moveq    #0,d0
  1310.             dc.w     $A82A
  1311.         EndM
  1312.     ELSE
  1313.         IMPORT_CFM_FUNCTION    SGGetChannelPlayFlags
  1314.     ENDIF
  1315.  
  1316. ;
  1317. ; pascal ComponentResult SGSetChannelMaxFrames(SGChannel c, long frameCount)
  1318. ;
  1319.     IF ¬ GENERATINGCFM THEN
  1320.         Macro
  1321.         _SGSetChannelMaxFrames
  1322.             dc.w     $2F3C
  1323.             dc.w     $0004
  1324.             dc.w     $0089
  1325.             moveq    #0,d0
  1326.             dc.w     $A82A
  1327.         EndM
  1328.     ELSE
  1329.         IMPORT_CFM_FUNCTION    SGSetChannelMaxFrames
  1330.     ENDIF
  1331.  
  1332. ;
  1333. ; pascal ComponentResult SGGetChannelMaxFrames(SGChannel c, long *frameCount)
  1334. ;
  1335.     IF ¬ GENERATINGCFM THEN
  1336.         Macro
  1337.         _SGGetChannelMaxFrames
  1338.             dc.w     $2F3C
  1339.             dc.w     $0004
  1340.             dc.w     $008A
  1341.             moveq    #0,d0
  1342.             dc.w     $A82A
  1343.         EndM
  1344.     ELSE
  1345.         IMPORT_CFM_FUNCTION    SGGetChannelMaxFrames
  1346.     ENDIF
  1347.  
  1348. ;
  1349. ; pascal ComponentResult SGSetChannelRefCon(SGChannel c, long refCon)
  1350. ;
  1351.     IF ¬ GENERATINGCFM THEN
  1352.         Macro
  1353.         _SGSetChannelRefCon
  1354.             dc.w     $2F3C
  1355.             dc.w     $0004
  1356.             dc.w     $008B
  1357.             moveq    #0,d0
  1358.             dc.w     $A82A
  1359.         EndM
  1360.     ELSE
  1361.         IMPORT_CFM_FUNCTION    SGSetChannelRefCon
  1362.     ENDIF
  1363.  
  1364. ;
  1365. ; pascal ComponentResult SGSetChannelClip(SGChannel c, RgnHandle theClip)
  1366. ;
  1367.     IF ¬ GENERATINGCFM THEN
  1368.         Macro
  1369.         _SGSetChannelClip
  1370.             dc.w     $2F3C
  1371.             dc.w     $0004
  1372.             dc.w     $008C
  1373.             moveq    #0,d0
  1374.             dc.w     $A82A
  1375.         EndM
  1376.     ELSE
  1377.         IMPORT_CFM_FUNCTION    SGSetChannelClip
  1378.     ENDIF
  1379.  
  1380. ;
  1381. ; pascal ComponentResult SGGetChannelClip(SGChannel c, RgnHandle *theClip)
  1382. ;
  1383.     IF ¬ GENERATINGCFM THEN
  1384.         Macro
  1385.         _SGGetChannelClip
  1386.             dc.w     $2F3C
  1387.             dc.w     $0004
  1388.             dc.w     $008D
  1389.             moveq    #0,d0
  1390.             dc.w     $A82A
  1391.         EndM
  1392.     ELSE
  1393.         IMPORT_CFM_FUNCTION    SGGetChannelClip
  1394.     ENDIF
  1395.  
  1396. ;
  1397. ; pascal ComponentResult SGGetChannelSampleDescription(SGChannel c, Handle sampleDesc)
  1398. ;
  1399.     IF ¬ GENERATINGCFM THEN
  1400.         Macro
  1401.         _SGGetChannelSampleDescription
  1402.             dc.w     $2F3C
  1403.             dc.w     $0004
  1404.             dc.w     $008E
  1405.             moveq    #0,d0
  1406.             dc.w     $A82A
  1407.         EndM
  1408.     ELSE
  1409.         IMPORT_CFM_FUNCTION    SGGetChannelSampleDescription
  1410.     ENDIF
  1411.  
  1412. ;
  1413. ; pascal ComponentResult SGGetChannelDeviceList(SGChannel c, long selectionFlags, SGDeviceList *list)
  1414. ;
  1415.     IF ¬ GENERATINGCFM THEN
  1416.         Macro
  1417.         _SGGetChannelDeviceList
  1418.             dc.w     $2F3C
  1419.             dc.w     $0008
  1420.             dc.w     $008F
  1421.             moveq    #0,d0
  1422.             dc.w     $A82A
  1423.         EndM
  1424.     ELSE
  1425.         IMPORT_CFM_FUNCTION    SGGetChannelDeviceList
  1426.     ENDIF
  1427.  
  1428. ;
  1429. ; pascal ComponentResult SGSetChannelDevice(SGChannel c, StringPtr name)
  1430. ;
  1431.     IF ¬ GENERATINGCFM THEN
  1432.         Macro
  1433.         _SGSetChannelDevice
  1434.             dc.w     $2F3C
  1435.             dc.w     $0004
  1436.             dc.w     $0090
  1437.             moveq    #0,d0
  1438.             dc.w     $A82A
  1439.         EndM
  1440.     ELSE
  1441.         IMPORT_CFM_FUNCTION    SGSetChannelDevice
  1442.     ENDIF
  1443.  
  1444. ;
  1445. ; pascal ComponentResult SGSetChannelMatrix(SGChannel c, const MatrixRecord *m)
  1446. ;
  1447.     IF ¬ GENERATINGCFM THEN
  1448.         Macro
  1449.         _SGSetChannelMatrix
  1450.             dc.w     $2F3C
  1451.             dc.w     $0004
  1452.             dc.w     $0091
  1453.             moveq    #0,d0
  1454.             dc.w     $A82A
  1455.         EndM
  1456.     ELSE
  1457.         IMPORT_CFM_FUNCTION    SGSetChannelMatrix
  1458.     ENDIF
  1459.  
  1460. ;
  1461. ; pascal ComponentResult SGGetChannelMatrix(SGChannel c, MatrixRecord *m)
  1462. ;
  1463.     IF ¬ GENERATINGCFM THEN
  1464.         Macro
  1465.         _SGGetChannelMatrix
  1466.             dc.w     $2F3C
  1467.             dc.w     $0004
  1468.             dc.w     $0092
  1469.             moveq    #0,d0
  1470.             dc.w     $A82A
  1471.         EndM
  1472.     ELSE
  1473.         IMPORT_CFM_FUNCTION    SGGetChannelMatrix
  1474.     ENDIF
  1475.  
  1476. ;
  1477. ; pascal ComponentResult SGGetChannelTimeScale(SGChannel c, TimeScale *scale)
  1478. ;
  1479.     IF ¬ GENERATINGCFM THEN
  1480.         Macro
  1481.         _SGGetChannelTimeScale
  1482.             dc.w     $2F3C
  1483.             dc.w     $0004
  1484.             dc.w     $0093
  1485.             moveq    #0,d0
  1486.             dc.w     $A82A
  1487.         EndM
  1488.     ELSE
  1489.         IMPORT_CFM_FUNCTION    SGGetChannelTimeScale
  1490.     ENDIF
  1491.  
  1492. ;
  1493. ; pascal ComponentResult SGChannelPutPicture(SGChannel c)
  1494. ;
  1495.     IF ¬ GENERATINGCFM THEN
  1496.         Macro
  1497.         _SGChannelPutPicture
  1498.             dc.w     $2F3C
  1499.             dc.w     $0000
  1500.             dc.w     $0094
  1501.             moveq    #0,d0
  1502.             dc.w     $A82A
  1503.         EndM
  1504.     ELSE
  1505.         IMPORT_CFM_FUNCTION    SGChannelPutPicture
  1506.     ENDIF
  1507.  
  1508. ;
  1509. ; pascal ComponentResult SGChannelSetRequestedDataRate(SGChannel c, long bytesPerSecond)
  1510. ;
  1511.     IF ¬ GENERATINGCFM THEN
  1512.         Macro
  1513.         _SGChannelSetRequestedDataRate
  1514.             dc.w     $2F3C
  1515.             dc.w     $0004
  1516.             dc.w     $0095
  1517.             moveq    #0,d0
  1518.             dc.w     $A82A
  1519.         EndM
  1520.     ELSE
  1521.         IMPORT_CFM_FUNCTION    SGChannelSetRequestedDataRate
  1522.     ENDIF
  1523.  
  1524. ;
  1525. ; pascal ComponentResult SGChannelGetRequestedDataRate(SGChannel c, long *bytesPerSecond)
  1526. ;
  1527.     IF ¬ GENERATINGCFM THEN
  1528.         Macro
  1529.         _SGChannelGetRequestedDataRate
  1530.             dc.w     $2F3C
  1531.             dc.w     $0004
  1532.             dc.w     $0096
  1533.             moveq    #0,d0
  1534.             dc.w     $A82A
  1535.         EndM
  1536.     ELSE
  1537.         IMPORT_CFM_FUNCTION    SGChannelGetRequestedDataRate
  1538.     ENDIF
  1539.  
  1540. ;
  1541. ; pascal ComponentResult SGChannelSetDataSourceName(SGChannel c, ConstStr255Param name, ScriptCode scriptTag)
  1542. ;
  1543.     IF ¬ GENERATINGCFM THEN
  1544.         Macro
  1545.         _SGChannelSetDataSourceName
  1546.             dc.w     $2F3C
  1547.             dc.w     $0006
  1548.             dc.w     $0097
  1549.             moveq    #0,d0
  1550.             dc.w     $A82A
  1551.         EndM
  1552.     ELSE
  1553.         IMPORT_CFM_FUNCTION    SGChannelSetDataSourceName
  1554.     ENDIF
  1555.  
  1556. ;
  1557. ; pascal ComponentResult SGChannelGetDataSourceName(SGChannel c, Str255 name, ScriptCode *scriptTag)
  1558. ;
  1559.     IF ¬ GENERATINGCFM THEN
  1560.         Macro
  1561.         _SGChannelGetDataSourceName
  1562.             dc.w     $2F3C
  1563.             dc.w     $0008
  1564.             dc.w     $0098
  1565.             moveq    #0,d0
  1566.             dc.w     $A82A
  1567.         EndM
  1568.     ELSE
  1569.         IMPORT_CFM_FUNCTION    SGChannelGetDataSourceName
  1570.     ENDIF
  1571.  
  1572. ;
  1573. ;    calls from seqGrab to Channel
  1574. ;
  1575. ;
  1576. ; pascal ComponentResult SGInitChannel(SGChannel c, SeqGrabComponent owner)
  1577. ;
  1578.     IF ¬ GENERATINGCFM THEN
  1579.         Macro
  1580.         _SGInitChannel
  1581.             dc.w     $2F3C
  1582.             dc.w     $0004
  1583.             dc.w     $0180
  1584.             moveq    #0,d0
  1585.             dc.w     $A82A
  1586.         EndM
  1587.     ELSE
  1588.         IMPORT_CFM_FUNCTION    SGInitChannel
  1589.     ENDIF
  1590.  
  1591. ;
  1592. ; pascal ComponentResult SGWriteSamples(SGChannel c, Movie m, AliasHandle theFile)
  1593. ;
  1594.     IF ¬ GENERATINGCFM THEN
  1595.         Macro
  1596.         _SGWriteSamples
  1597.             dc.w     $2F3C
  1598.             dc.w     $0008
  1599.             dc.w     $0181
  1600.             moveq    #0,d0
  1601.             dc.w     $A82A
  1602.         EndM
  1603.     ELSE
  1604.         IMPORT_CFM_FUNCTION    SGWriteSamples
  1605.     ENDIF
  1606.  
  1607. ;
  1608. ; pascal ComponentResult SGGetDataRate(SGChannel c, long *bytesPerSecond)
  1609. ;
  1610.     IF ¬ GENERATINGCFM THEN
  1611.         Macro
  1612.         _SGGetDataRate
  1613.             dc.w     $2F3C
  1614.             dc.w     $0004
  1615.             dc.w     $0182
  1616.             moveq    #0,d0
  1617.             dc.w     $A82A
  1618.         EndM
  1619.     ELSE
  1620.         IMPORT_CFM_FUNCTION    SGGetDataRate
  1621.     ENDIF
  1622.  
  1623. ;
  1624. ; pascal ComponentResult SGAlignChannelRect(SGChannel c, Rect *r)
  1625. ;
  1626.     IF ¬ GENERATINGCFM THEN
  1627.         Macro
  1628.         _SGAlignChannelRect
  1629.             dc.w     $2F3C
  1630.             dc.w     $0004
  1631.             dc.w     $0183
  1632.             moveq    #0,d0
  1633.             dc.w     $A82A
  1634.         EndM
  1635.     ELSE
  1636.         IMPORT_CFM_FUNCTION    SGAlignChannelRect
  1637.     ENDIF
  1638.  
  1639. ;
  1640. ;    Dorky dialog panel calls
  1641. ;
  1642. ;
  1643. ; pascal ComponentResult SGPanelGetDitl(SeqGrabComponent s, Handle *ditl)
  1644. ;
  1645.     IF ¬ GENERATINGCFM THEN
  1646.         Macro
  1647.         _SGPanelGetDitl
  1648.             dc.w     $2F3C
  1649.             dc.w     $0004
  1650.             dc.w     $0200
  1651.             moveq    #0,d0
  1652.             dc.w     $A82A
  1653.         EndM
  1654.     ELSE
  1655.         IMPORT_CFM_FUNCTION    SGPanelGetDitl
  1656.     ENDIF
  1657.  
  1658. ;
  1659. ; pascal ComponentResult SGPanelGetTitle(SeqGrabComponent s, Str255 title)
  1660. ;
  1661.     IF ¬ GENERATINGCFM THEN
  1662.         Macro
  1663.         _SGPanelGetTitle
  1664.             dc.w     $2F3C
  1665.             dc.w     $0004
  1666.             dc.w     $0201
  1667.             moveq    #0,d0
  1668.             dc.w     $A82A
  1669.         EndM
  1670.     ELSE
  1671.         IMPORT_CFM_FUNCTION    SGPanelGetTitle
  1672.     ENDIF
  1673.  
  1674. ;
  1675. ; pascal ComponentResult SGPanelCanRun(SeqGrabComponent s, SGChannel c)
  1676. ;
  1677.     IF ¬ GENERATINGCFM THEN
  1678.         Macro
  1679.         _SGPanelCanRun
  1680.             dc.w     $2F3C
  1681.             dc.w     $0004
  1682.             dc.w     $0202
  1683.             moveq    #0,d0
  1684.             dc.w     $A82A
  1685.         EndM
  1686.     ELSE
  1687.         IMPORT_CFM_FUNCTION    SGPanelCanRun
  1688.     ENDIF
  1689.  
  1690. ;
  1691. ; pascal ComponentResult SGPanelInstall(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset)
  1692. ;
  1693.     IF ¬ GENERATINGCFM THEN
  1694.         Macro
  1695.         _SGPanelInstall
  1696.             dc.w     $2F3C
  1697.             dc.w     $000A
  1698.             dc.w     $0203
  1699.             moveq    #0,d0
  1700.             dc.w     $A82A
  1701.         EndM
  1702.     ELSE
  1703.         IMPORT_CFM_FUNCTION    SGPanelInstall
  1704.     ENDIF
  1705.  
  1706. ;
  1707. ; pascal ComponentResult SGPanelEvent(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord *theEvent, short *itemHit, Boolean *handled)
  1708. ;
  1709.     IF ¬ GENERATINGCFM THEN
  1710.         Macro
  1711.         _SGPanelEvent
  1712.             dc.w     $2F3C
  1713.             dc.w     $0016
  1714.             dc.w     $0204
  1715.             moveq    #0,d0
  1716.             dc.w     $A82A
  1717.         EndM
  1718.     ELSE
  1719.         IMPORT_CFM_FUNCTION    SGPanelEvent
  1720.     ENDIF
  1721.  
  1722. ;
  1723. ; pascal ComponentResult SGPanelItem(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, short itemNum)
  1724. ;
  1725.     IF ¬ GENERATINGCFM THEN
  1726.         Macro
  1727.         _SGPanelItem
  1728.             dc.w     $2F3C
  1729.             dc.w     $000C
  1730.             dc.w     $0205
  1731.             moveq    #0,d0
  1732.             dc.w     $A82A
  1733.         EndM
  1734.     ELSE
  1735.         IMPORT_CFM_FUNCTION    SGPanelItem
  1736.     ENDIF
  1737.  
  1738. ;
  1739. ; pascal ComponentResult SGPanelRemove(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset)
  1740. ;
  1741.     IF ¬ GENERATINGCFM THEN
  1742.         Macro
  1743.         _SGPanelRemove
  1744.             dc.w     $2F3C
  1745.             dc.w     $000A
  1746.             dc.w     $0206
  1747.             moveq    #0,d0
  1748.             dc.w     $A82A
  1749.         EndM
  1750.     ELSE
  1751.         IMPORT_CFM_FUNCTION    SGPanelRemove
  1752.     ENDIF
  1753.  
  1754. ;
  1755. ; pascal ComponentResult SGPanelSetGrabber(SeqGrabComponent s, SeqGrabComponent sg)
  1756. ;
  1757.     IF ¬ GENERATINGCFM THEN
  1758.         Macro
  1759.         _SGPanelSetGrabber
  1760.             dc.w     $2F3C
  1761.             dc.w     $0004
  1762.             dc.w     $0207
  1763.             moveq    #0,d0
  1764.             dc.w     $A82A
  1765.         EndM
  1766.     ELSE
  1767.         IMPORT_CFM_FUNCTION    SGPanelSetGrabber
  1768.     ENDIF
  1769.  
  1770. ;
  1771. ; pascal ComponentResult SGPanelSetResFile(SeqGrabComponent s, short resRef)
  1772. ;
  1773.     IF ¬ GENERATINGCFM THEN
  1774.         Macro
  1775.         _SGPanelSetResFile
  1776.             dc.w     $2F3C
  1777.             dc.w     $0002
  1778.             dc.w     $0208
  1779.             moveq    #0,d0
  1780.             dc.w     $A82A
  1781.         EndM
  1782.     ELSE
  1783.         IMPORT_CFM_FUNCTION    SGPanelSetResFile
  1784.     ENDIF
  1785.  
  1786. ;
  1787. ; pascal ComponentResult SGPanelGetSettings(SeqGrabComponent s, SGChannel c, UserData *ud, long flags)
  1788. ;
  1789.     IF ¬ GENERATINGCFM THEN
  1790.         Macro
  1791.         _SGPanelGetSettings
  1792.             dc.w     $2F3C
  1793.             dc.w     $000C
  1794.             dc.w     $0209
  1795.             moveq    #0,d0
  1796.             dc.w     $A82A
  1797.         EndM
  1798.     ELSE
  1799.         IMPORT_CFM_FUNCTION    SGPanelGetSettings
  1800.     ENDIF
  1801.  
  1802. ;
  1803. ; pascal ComponentResult SGPanelSetSettings(SeqGrabComponent s, SGChannel c, UserData ud, long flags)
  1804. ;
  1805.     IF ¬ GENERATINGCFM THEN
  1806.         Macro
  1807.         _SGPanelSetSettings
  1808.             dc.w     $2F3C
  1809.             dc.w     $000C
  1810.             dc.w     $020A
  1811.             moveq    #0,d0
  1812.             dc.w     $A82A
  1813.         EndM
  1814.     ELSE
  1815.         IMPORT_CFM_FUNCTION    SGPanelSetSettings
  1816.     ENDIF
  1817.  
  1818. ;
  1819. ; pascal ComponentResult SGPanelValidateInput(SeqGrabComponent s, Boolean *ok)
  1820. ;
  1821.     IF ¬ GENERATINGCFM THEN
  1822.         Macro
  1823.         _SGPanelValidateInput
  1824.             dc.w     $2F3C
  1825.             dc.w     $0004
  1826.             dc.w     $020B
  1827.             moveq    #0,d0
  1828.             dc.w     $A82A
  1829.         EndM
  1830.     ELSE
  1831.         IMPORT_CFM_FUNCTION    SGPanelValidateInput
  1832.     ENDIF
  1833.  
  1834. ;
  1835. ; pascal ComponentResult SGPanelSetEventFilter(SeqGrabComponent s, SGModalFilterUPP proc, long refCon)
  1836. ;
  1837.     IF ¬ GENERATINGCFM THEN
  1838.         Macro
  1839.         _SGPanelSetEventFilter
  1840.             dc.w     $2F3C
  1841.             dc.w     $0008
  1842.             dc.w     $020C
  1843.             moveq    #0,d0
  1844.             dc.w     $A82A
  1845.         EndM
  1846.     ELSE
  1847.         IMPORT_CFM_FUNCTION    SGPanelSetEventFilter
  1848.     ENDIF
  1849.  
  1850. ;** Sequence Grab VIDEO CHANNEL Component Stuff **
  1851. ;
  1852. ;    Video stuff
  1853. ;
  1854. SGCompressInfo             RECORD    0
  1855. buffer                     ds.l   1        ; offset: $0 (0)
  1856. bufferSize                 ds.l   1        ; offset: $4 (4)
  1857. similarity                 ds.b   1        ; offset: $8 (8)
  1858. reserved                 ds.b   1        ; offset: $9 (9)
  1859. sizeof                     EQU *            ; size:   $A (10)
  1860.                         ENDR
  1861.  
  1862. ; typedef struct SGCompressInfo  SGCompressInfo
  1863. VideoBottles             RECORD    0
  1864. procCount                 ds.w   1        ; offset: $0 (0)
  1865. grabProc                 ds.l   1        ; offset: $2 (2)
  1866. grabCompleteProc         ds.l   1        ; offset: $6 (6)
  1867. displayProc                 ds.l   1        ; offset: $A (10)
  1868. compressProc             ds.l   1        ; offset: $E (14)
  1869. compressCompleteProc     ds.l   1        ; offset: $12 (18)
  1870. addFrameProc             ds.l   1        ; offset: $16 (22)
  1871. transferFrameProc         ds.l   1        ; offset: $1A (26)
  1872. grabCompressCompleteProc ds.l   1        ; offset: $1E (30)
  1873. displayCompressProc         ds.l   1        ; offset: $22 (34)
  1874. sizeof                     EQU *            ; size:   $26 (38)
  1875.                         ENDR
  1876.  
  1877. ; typedef struct VideoBottles  VideoBottles
  1878. ;
  1879. ; pascal ComponentResult SGGetSrcVideoBounds(SGChannel c, Rect *r)
  1880. ;
  1881.     IF ¬ GENERATINGCFM THEN
  1882.         Macro
  1883.         _SGGetSrcVideoBounds
  1884.             dc.w     $2F3C
  1885.             dc.w     $0004
  1886.             dc.w     $0100
  1887.             moveq    #0,d0
  1888.             dc.w     $A82A
  1889.         EndM
  1890.     ELSE
  1891.         IMPORT_CFM_FUNCTION    SGGetSrcVideoBounds
  1892.     ENDIF
  1893.  
  1894. ;
  1895. ; pascal ComponentResult SGSetVideoRect(SGChannel c, const Rect *r)
  1896. ;
  1897.     IF ¬ GENERATINGCFM THEN
  1898.         Macro
  1899.         _SGSetVideoRect
  1900.             dc.w     $2F3C
  1901.             dc.w     $0004
  1902.             dc.w     $0101
  1903.             moveq    #0,d0
  1904.             dc.w     $A82A
  1905.         EndM
  1906.     ELSE
  1907.         IMPORT_CFM_FUNCTION    SGSetVideoRect
  1908.     ENDIF
  1909.  
  1910. ;
  1911. ; pascal ComponentResult SGGetVideoRect(SGChannel c, Rect *r)
  1912. ;
  1913.     IF ¬ GENERATINGCFM THEN
  1914.         Macro
  1915.         _SGGetVideoRect
  1916.             dc.w     $2F3C
  1917.             dc.w     $0004
  1918.             dc.w     $0102
  1919.             moveq    #0,d0
  1920.             dc.w     $A82A
  1921.         EndM
  1922.     ELSE
  1923.         IMPORT_CFM_FUNCTION    SGGetVideoRect
  1924.     ENDIF
  1925.  
  1926. ;
  1927. ; pascal ComponentResult SGGetVideoCompressorType(SGChannel c, OSType *compressorType)
  1928. ;
  1929.     IF ¬ GENERATINGCFM THEN
  1930.         Macro
  1931.         _SGGetVideoCompressorType
  1932.             dc.w     $2F3C
  1933.             dc.w     $0004
  1934.             dc.w     $0103
  1935.             moveq    #0,d0
  1936.             dc.w     $A82A
  1937.         EndM
  1938.     ELSE
  1939.         IMPORT_CFM_FUNCTION    SGGetVideoCompressorType
  1940.     ENDIF
  1941.  
  1942. ;
  1943. ; pascal ComponentResult SGSetVideoCompressorType(SGChannel c, OSType compressorType)
  1944. ;
  1945.     IF ¬ GENERATINGCFM THEN
  1946.         Macro
  1947.         _SGSetVideoCompressorType
  1948.             dc.w     $2F3C
  1949.             dc.w     $0004
  1950.             dc.w     $0104
  1951.             moveq    #0,d0
  1952.             dc.w     $A82A
  1953.         EndM
  1954.     ELSE
  1955.         IMPORT_CFM_FUNCTION    SGSetVideoCompressorType
  1956.     ENDIF
  1957.  
  1958. ;
  1959. ; pascal ComponentResult SGSetVideoCompressor(SGChannel c, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)
  1960. ;
  1961.     IF ¬ GENERATINGCFM THEN
  1962.         Macro
  1963.         _SGSetVideoCompressor
  1964.             dc.w     $2F3C
  1965.             dc.w     $0012
  1966.             dc.w     $0105
  1967.             moveq    #0,d0
  1968.             dc.w     $A82A
  1969.         EndM
  1970.     ELSE
  1971.         IMPORT_CFM_FUNCTION    SGSetVideoCompressor
  1972.     ENDIF
  1973.  
  1974. ;
  1975. ; pascal ComponentResult SGGetVideoCompressor(SGChannel c, short *depth, CompressorComponent *compressor, CodecQ *spatialQuality, CodecQ *temporalQuality, long *keyFrameRate)
  1976. ;
  1977.     IF ¬ GENERATINGCFM THEN
  1978.         Macro
  1979.         _SGGetVideoCompressor
  1980.             dc.w     $2F3C
  1981.             dc.w     $0014
  1982.             dc.w     $0106
  1983.             moveq    #0,d0
  1984.             dc.w     $A82A
  1985.         EndM
  1986.     ELSE
  1987.         IMPORT_CFM_FUNCTION    SGGetVideoCompressor
  1988.     ENDIF
  1989.  
  1990. ;
  1991. ; pascal ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
  1992. ;
  1993.     IF ¬ GENERATINGCFM THEN
  1994.         Macro
  1995.         _SGGetVideoDigitizerComponent
  1996.             dc.w     $2F3C
  1997.             dc.w     $0000
  1998.             dc.w     $0107
  1999.             moveq    #0,d0
  2000.             dc.w     $A82A
  2001.         EndM
  2002.     ELSE
  2003.         IMPORT_CFM_FUNCTION    SGGetVideoDigitizerComponent
  2004.     ENDIF
  2005.  
  2006. ;
  2007. ; pascal ComponentResult SGSetVideoDigitizerComponent(SGChannel c, ComponentInstance vdig)
  2008. ;
  2009.     IF ¬ GENERATINGCFM THEN
  2010.         Macro
  2011.         _SGSetVideoDigitizerComponent
  2012.             dc.w     $2F3C
  2013.             dc.w     $0004
  2014.             dc.w     $0108
  2015.             moveq    #0,d0
  2016.             dc.w     $A82A
  2017.         EndM
  2018.     ELSE
  2019.         IMPORT_CFM_FUNCTION    SGSetVideoDigitizerComponent
  2020.     ENDIF
  2021.  
  2022. ;
  2023. ; pascal ComponentResult SGVideoDigitizerChanged(SGChannel c)
  2024. ;
  2025.     IF ¬ GENERATINGCFM THEN
  2026.         Macro
  2027.         _SGVideoDigitizerChanged
  2028.             dc.w     $2F3C
  2029.             dc.w     $0000
  2030.             dc.w     $0109
  2031.             moveq    #0,d0
  2032.             dc.w     $A82A
  2033.         EndM
  2034.     ELSE
  2035.         IMPORT_CFM_FUNCTION    SGVideoDigitizerChanged
  2036.     ENDIF
  2037.  
  2038. ;
  2039. ; pascal ComponentResult SGSetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  2040. ;
  2041.     IF ¬ GENERATINGCFM THEN
  2042.         Macro
  2043.         _SGSetVideoBottlenecks
  2044.             dc.w     $2F3C
  2045.             dc.w     $0004
  2046.             dc.w     $010A
  2047.             moveq    #0,d0
  2048.             dc.w     $A82A
  2049.         EndM
  2050.     ELSE
  2051.         IMPORT_CFM_FUNCTION    SGSetVideoBottlenecks
  2052.     ENDIF
  2053.  
  2054. ;
  2055. ; pascal ComponentResult SGGetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  2056. ;
  2057.     IF ¬ GENERATINGCFM THEN
  2058.         Macro
  2059.         _SGGetVideoBottlenecks
  2060.             dc.w     $2F3C
  2061.             dc.w     $0004
  2062.             dc.w     $010B
  2063.             moveq    #0,d0
  2064.             dc.w     $A82A
  2065.         EndM
  2066.     ELSE
  2067.         IMPORT_CFM_FUNCTION    SGGetVideoBottlenecks
  2068.     ENDIF
  2069.  
  2070. ;
  2071. ; pascal ComponentResult SGGrabFrame(SGChannel c, short bufferNum)
  2072. ;
  2073.     IF ¬ GENERATINGCFM THEN
  2074.         Macro
  2075.         _SGGrabFrame
  2076.             dc.w     $2F3C
  2077.             dc.w     $0002
  2078.             dc.w     $010C
  2079.             moveq    #0,d0
  2080.             dc.w     $A82A
  2081.         EndM
  2082.     ELSE
  2083.         IMPORT_CFM_FUNCTION    SGGrabFrame
  2084.     ENDIF
  2085.  
  2086. ;
  2087. ; pascal ComponentResult SGGrabFrameComplete(SGChannel c, short bufferNum, Boolean *done)
  2088. ;
  2089.     IF ¬ GENERATINGCFM THEN
  2090.         Macro
  2091.         _SGGrabFrameComplete
  2092.             dc.w     $2F3C
  2093.             dc.w     $0006
  2094.             dc.w     $010D
  2095.             moveq    #0,d0
  2096.             dc.w     $A82A
  2097.         EndM
  2098.     ELSE
  2099.         IMPORT_CFM_FUNCTION    SGGrabFrameComplete
  2100.     ENDIF
  2101.  
  2102. ;
  2103. ; pascal ComponentResult SGDisplayFrame(SGChannel c, short bufferNum, const MatrixRecord *mp, RgnHandle clipRgn)
  2104. ;
  2105.     IF ¬ GENERATINGCFM THEN
  2106.         Macro
  2107.         _SGDisplayFrame
  2108.             dc.w     $2F3C
  2109.             dc.w     $000A
  2110.             dc.w     $010E
  2111.             moveq    #0,d0
  2112.             dc.w     $A82A
  2113.         EndM
  2114.     ELSE
  2115.         IMPORT_CFM_FUNCTION    SGDisplayFrame
  2116.     ENDIF
  2117.  
  2118. ;
  2119. ; pascal ComponentResult SGCompressFrame(SGChannel c, short bufferNum)
  2120. ;
  2121.     IF ¬ GENERATINGCFM THEN
  2122.         Macro
  2123.         _SGCompressFrame
  2124.             dc.w     $2F3C
  2125.             dc.w     $0002
  2126.             dc.w     $010F
  2127.             moveq    #0,d0
  2128.             dc.w     $A82A
  2129.         EndM
  2130.     ELSE
  2131.         IMPORT_CFM_FUNCTION    SGCompressFrame
  2132.     ENDIF
  2133.  
  2134. ;
  2135. ; pascal ComponentResult SGCompressFrameComplete(SGChannel c, short bufferNum, Boolean *done, SGCompressInfo *ci)
  2136. ;
  2137.     IF ¬ GENERATINGCFM THEN
  2138.         Macro
  2139.         _SGCompressFrameComplete
  2140.             dc.w     $2F3C
  2141.             dc.w     $000A
  2142.             dc.w     $0110
  2143.             moveq    #0,d0
  2144.             dc.w     $A82A
  2145.         EndM
  2146.     ELSE
  2147.         IMPORT_CFM_FUNCTION    SGCompressFrameComplete
  2148.     ENDIF
  2149.  
  2150. ;
  2151. ; pascal ComponentResult SGAddFrame(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale, const SGCompressInfo *ci)
  2152. ;
  2153.     IF ¬ GENERATINGCFM THEN
  2154.         Macro
  2155.         _SGAddFrame
  2156.             dc.w     $2F3C
  2157.             dc.w     $000E
  2158.             dc.w     $0111
  2159.             moveq    #0,d0
  2160.             dc.w     $A82A
  2161.         EndM
  2162.     ELSE
  2163.         IMPORT_CFM_FUNCTION    SGAddFrame
  2164.     ENDIF
  2165.  
  2166. ;
  2167. ; pascal ComponentResult SGTransferFrameForCompress(SGChannel c, short bufferNum, const MatrixRecord *mp, RgnHandle clipRgn)
  2168. ;
  2169.     IF ¬ GENERATINGCFM THEN
  2170.         Macro
  2171.         _SGTransferFrameForCompress
  2172.             dc.w     $2F3C
  2173.             dc.w     $000A
  2174.             dc.w     $0112
  2175.             moveq    #0,d0
  2176.             dc.w     $A82A
  2177.         EndM
  2178.     ELSE
  2179.         IMPORT_CFM_FUNCTION    SGTransferFrameForCompress
  2180.     ENDIF
  2181.  
  2182. ;
  2183. ; pascal ComponentResult SGSetCompressBuffer(SGChannel c, short depth, const Rect *compressSize)
  2184. ;
  2185.     IF ¬ GENERATINGCFM THEN
  2186.         Macro
  2187.         _SGSetCompressBuffer
  2188.             dc.w     $2F3C
  2189.             dc.w     $0006
  2190.             dc.w     $0113
  2191.             moveq    #0,d0
  2192.             dc.w     $A82A
  2193.         EndM
  2194.     ELSE
  2195.         IMPORT_CFM_FUNCTION    SGSetCompressBuffer
  2196.     ENDIF
  2197.  
  2198. ;
  2199. ; pascal ComponentResult SGGetCompressBuffer(SGChannel c, short *depth, Rect *compressSize)
  2200. ;
  2201.     IF ¬ GENERATINGCFM THEN
  2202.         Macro
  2203.         _SGGetCompressBuffer
  2204.             dc.w     $2F3C
  2205.             dc.w     $0008
  2206.             dc.w     $0114
  2207.             moveq    #0,d0
  2208.             dc.w     $A82A
  2209.         EndM
  2210.     ELSE
  2211.         IMPORT_CFM_FUNCTION    SGGetCompressBuffer
  2212.     ENDIF
  2213.  
  2214. ;
  2215. ; pascal ComponentResult SGGetBufferInfo(SGChannel c, short bufferNum, PixMapHandle *bufferPM, Rect *bufferRect, GWorldPtr *compressBuffer, Rect *compressBufferRect)
  2216. ;
  2217.     IF ¬ GENERATINGCFM THEN
  2218.         Macro
  2219.         _SGGetBufferInfo
  2220.             dc.w     $2F3C
  2221.             dc.w     $0012
  2222.             dc.w     $0115
  2223.             moveq    #0,d0
  2224.             dc.w     $A82A
  2225.         EndM
  2226.     ELSE
  2227.         IMPORT_CFM_FUNCTION    SGGetBufferInfo
  2228.     ENDIF
  2229.  
  2230. ;
  2231. ; pascal ComponentResult SGSetUseScreenBuffer(SGChannel c, Boolean useScreenBuffer)
  2232. ;
  2233.     IF ¬ GENERATINGCFM THEN
  2234.         Macro
  2235.         _SGSetUseScreenBuffer
  2236.             dc.w     $2F3C
  2237.             dc.w     $0002
  2238.             dc.w     $0116
  2239.             moveq    #0,d0
  2240.             dc.w     $A82A
  2241.         EndM
  2242.     ELSE
  2243.         IMPORT_CFM_FUNCTION    SGSetUseScreenBuffer
  2244.     ENDIF
  2245.  
  2246. ;
  2247. ; pascal ComponentResult SGGetUseScreenBuffer(SGChannel c, Boolean *useScreenBuffer)
  2248. ;
  2249.     IF ¬ GENERATINGCFM THEN
  2250.         Macro
  2251.         _SGGetUseScreenBuffer
  2252.             dc.w     $2F3C
  2253.             dc.w     $0004
  2254.             dc.w     $0117
  2255.             moveq    #0,d0
  2256.             dc.w     $A82A
  2257.         EndM
  2258.     ELSE
  2259.         IMPORT_CFM_FUNCTION    SGGetUseScreenBuffer
  2260.     ENDIF
  2261.  
  2262. ;
  2263. ; pascal ComponentResult SGGrabCompressComplete(SGChannel c, Boolean *done, SGCompressInfo *ci, TimeRecord *tr)
  2264. ;
  2265.     IF ¬ GENERATINGCFM THEN
  2266.         Macro
  2267.         _SGGrabCompressComplete
  2268.             dc.w     $2F3C
  2269.             dc.w     $000C
  2270.             dc.w     $0118
  2271.             moveq    #0,d0
  2272.             dc.w     $A82A
  2273.         EndM
  2274.     ELSE
  2275.         IMPORT_CFM_FUNCTION    SGGrabCompressComplete
  2276.     ENDIF
  2277.  
  2278. ;
  2279. ; pascal ComponentResult SGDisplayCompress(SGChannel c, Ptr dataPtr, ImageDescriptionHandle desc, MatrixRecord *mp, RgnHandle clipRgn)
  2280. ;
  2281.     IF ¬ GENERATINGCFM THEN
  2282.         Macro
  2283.         _SGDisplayCompress
  2284.             dc.w     $2F3C
  2285.             dc.w     $0010
  2286.             dc.w     $0119
  2287.             moveq    #0,d0
  2288.             dc.w     $A82A
  2289.         EndM
  2290.     ELSE
  2291.         IMPORT_CFM_FUNCTION    SGDisplayCompress
  2292.     ENDIF
  2293.  
  2294. ;
  2295. ; pascal ComponentResult SGSetFrameRate(SGChannel c, Fixed frameRate)
  2296. ;
  2297.     IF ¬ GENERATINGCFM THEN
  2298.         Macro
  2299.         _SGSetFrameRate
  2300.             dc.w     $2F3C
  2301.             dc.w     $0004
  2302.             dc.w     $011A
  2303.             moveq    #0,d0
  2304.             dc.w     $A82A
  2305.         EndM
  2306.     ELSE
  2307.         IMPORT_CFM_FUNCTION    SGSetFrameRate
  2308.     ENDIF
  2309.  
  2310. ;
  2311. ; pascal ComponentResult SGGetFrameRate(SGChannel c, Fixed *frameRate)
  2312. ;
  2313.     IF ¬ GENERATINGCFM THEN
  2314.         Macro
  2315.         _SGGetFrameRate
  2316.             dc.w     $2F3C
  2317.             dc.w     $0004
  2318.             dc.w     $011B
  2319.             moveq    #0,d0
  2320.             dc.w     $A82A
  2321.         EndM
  2322.     ELSE
  2323.         IMPORT_CFM_FUNCTION    SGGetFrameRate
  2324.     ENDIF
  2325.  
  2326. ;** Sequence Grab SOUND CHANNEL Component Stuff **
  2327. ;
  2328. ;    Sound stuff
  2329. ;
  2330. ;
  2331. ; pascal ComponentResult SGSetSoundInputDriver(SGChannel c, ConstStr255Param driverName)
  2332. ;
  2333.     IF ¬ GENERATINGCFM THEN
  2334.         Macro
  2335.         _SGSetSoundInputDriver
  2336.             dc.w     $2F3C
  2337.             dc.w     $0004
  2338.             dc.w     $0100
  2339.             moveq    #0,d0
  2340.             dc.w     $A82A
  2341.         EndM
  2342.     ELSE
  2343.         IMPORT_CFM_FUNCTION    SGSetSoundInputDriver
  2344.     ENDIF
  2345.  
  2346. ;
  2347. ; pascal long SGGetSoundInputDriver(SGChannel c)
  2348. ;
  2349.     IF ¬ GENERATINGCFM THEN
  2350.         Macro
  2351.         _SGGetSoundInputDriver
  2352.             dc.w     $2F3C
  2353.             dc.w     $0000
  2354.             dc.w     $0101
  2355.             moveq    #0,d0
  2356.             dc.w     $A82A
  2357.         EndM
  2358.     ELSE
  2359.         IMPORT_CFM_FUNCTION    SGGetSoundInputDriver
  2360.     ENDIF
  2361.  
  2362. ;
  2363. ; pascal ComponentResult SGSoundInputDriverChanged(SGChannel c)
  2364. ;
  2365.     IF ¬ GENERATINGCFM THEN
  2366.         Macro
  2367.         _SGSoundInputDriverChanged
  2368.             dc.w     $2F3C
  2369.             dc.w     $0000
  2370.             dc.w     $0102
  2371.             moveq    #0,d0
  2372.             dc.w     $A82A
  2373.         EndM
  2374.     ELSE
  2375.         IMPORT_CFM_FUNCTION    SGSoundInputDriverChanged
  2376.     ENDIF
  2377.  
  2378. ;
  2379. ; pascal ComponentResult SGSetSoundRecordChunkSize(SGChannel c, long seconds)
  2380. ;
  2381.     IF ¬ GENERATINGCFM THEN
  2382.         Macro
  2383.         _SGSetSoundRecordChunkSize
  2384.             dc.w     $2F3C
  2385.             dc.w     $0004
  2386.             dc.w     $0103
  2387.             moveq    #0,d0
  2388.             dc.w     $A82A
  2389.         EndM
  2390.     ELSE
  2391.         IMPORT_CFM_FUNCTION    SGSetSoundRecordChunkSize
  2392.     ENDIF
  2393.  
  2394. ;
  2395. ; pascal long SGGetSoundRecordChunkSize(SGChannel c)
  2396. ;
  2397.     IF ¬ GENERATINGCFM THEN
  2398.         Macro
  2399.         _SGGetSoundRecordChunkSize
  2400.             dc.w     $2F3C
  2401.             dc.w     $0000
  2402.             dc.w     $0104
  2403.             moveq    #0,d0
  2404.             dc.w     $A82A
  2405.         EndM
  2406.     ELSE
  2407.         IMPORT_CFM_FUNCTION    SGGetSoundRecordChunkSize
  2408.     ENDIF
  2409.  
  2410. ;
  2411. ; pascal ComponentResult SGSetSoundInputRate(SGChannel c, Fixed rate)
  2412. ;
  2413.     IF ¬ GENERATINGCFM THEN
  2414.         Macro
  2415.         _SGSetSoundInputRate
  2416.             dc.w     $2F3C
  2417.             dc.w     $0004
  2418.             dc.w     $0105
  2419.             moveq    #0,d0
  2420.             dc.w     $A82A
  2421.         EndM
  2422.     ELSE
  2423.         IMPORT_CFM_FUNCTION    SGSetSoundInputRate
  2424.     ENDIF
  2425.  
  2426. ;
  2427. ; pascal Fixed SGGetSoundInputRate(SGChannel c)
  2428. ;
  2429.     IF ¬ GENERATINGCFM THEN
  2430.         Macro
  2431.         _SGGetSoundInputRate
  2432.             dc.w     $2F3C
  2433.             dc.w     $0000
  2434.             dc.w     $0106
  2435.             moveq    #0,d0
  2436.             dc.w     $A82A
  2437.         EndM
  2438.     ELSE
  2439.         IMPORT_CFM_FUNCTION    SGGetSoundInputRate
  2440.     ENDIF
  2441.  
  2442. ;
  2443. ; pascal ComponentResult SGSetSoundInputParameters(SGChannel c, short sampleSize, short numChannels, OSType compressionType)
  2444. ;
  2445.     IF ¬ GENERATINGCFM THEN
  2446.         Macro
  2447.         _SGSetSoundInputParameters
  2448.             dc.w     $2F3C
  2449.             dc.w     $0008
  2450.             dc.w     $0107
  2451.             moveq    #0,d0
  2452.             dc.w     $A82A
  2453.         EndM
  2454.     ELSE
  2455.         IMPORT_CFM_FUNCTION    SGSetSoundInputParameters
  2456.     ENDIF
  2457.  
  2458. ;
  2459. ; pascal ComponentResult SGGetSoundInputParameters(SGChannel c, short *sampleSize, short *numChannels, OSType *compressionType)
  2460. ;
  2461.     IF ¬ GENERATINGCFM THEN
  2462.         Macro
  2463.         _SGGetSoundInputParameters
  2464.             dc.w     $2F3C
  2465.             dc.w     $000C
  2466.             dc.w     $0108
  2467.             moveq    #0,d0
  2468.             dc.w     $A82A
  2469.         EndM
  2470.     ELSE
  2471.         IMPORT_CFM_FUNCTION    SGGetSoundInputParameters
  2472.     ENDIF
  2473.  
  2474.  
  2475. sgChannelAtom                    EQU        'chan'
  2476. sgChannelSettingsAtom            EQU        'ctom'
  2477. sgChannelDescription            EQU        'cdsc'
  2478. sgChannelSettings                EQU        'cset'
  2479.  
  2480. sgDeviceNameType                EQU        'name'
  2481. sgUsageType                        EQU        'use '
  2482. sgPlayFlagsType                    EQU        'plyf'
  2483. sgClipType                        EQU        'clip'
  2484. sgMatrixType                    EQU        'mtrx'
  2485. sgVolumeType                    EQU        'volu'
  2486.  
  2487. sgPanelSettingsAtom                EQU        'ptom'
  2488. sgPanelDescription                EQU        'pdsc'
  2489. sgPanelSettings                    EQU        'pset'
  2490.  
  2491. sgcSoundCompressionType            EQU        'scmp'
  2492. sgcSoundSampleRateType            EQU        'srat'
  2493. sgcSoundChannelCountType        EQU        'schn'
  2494. sgcSoundSampleSizeType            EQU        'ssiz'
  2495. sgcSoundInputType                EQU        'sinp'
  2496. sgcSoundGainType                EQU        'gain'
  2497.  
  2498. sgcVideoHueType                    EQU        'hue '
  2499. sgcVideoSaturationType            EQU        'satr'
  2500. sgcVideoContrastType            EQU        'trst'
  2501. sgcVideoSharpnessType            EQU        'shrp'
  2502. sgcVideoBrigtnessType            EQU        'brit'
  2503. sgcVideoBlackLevelType            EQU        'blkl'
  2504. sgcVideoWhiteLevelType            EQU        'whtl'
  2505. sgcVideoInputType                EQU        'vinp'
  2506. sgcVideoFormatType                EQU        'vstd'
  2507. sgcVideoFilterType                EQU        'vflt'
  2508. sgcVideoRectType                EQU        'vrct'
  2509. sgVideoDigitizerType            EQU        'vdig'
  2510.  
  2511. kSGInitializeSelect                EQU        $1
  2512. kSGSetDataOutputSelect            EQU        $2
  2513. kSGGetDataOutputSelect            EQU        $3
  2514. kSGSetGWorldSelect                EQU        $4
  2515. kSGGetGWorldSelect                EQU        $5
  2516. kSGNewChannelSelect                EQU        $6
  2517. kSGDisposeChannelSelect            EQU        $7
  2518. kSGStartPreviewSelect            EQU        $10
  2519. kSGStartRecordSelect            EQU        $11
  2520. kSGIdleSelect                    EQU        $12
  2521. kSGStopSelect                    EQU        $13
  2522. kSGPauseSelect                    EQU        $14
  2523. kSGPrepareSelect                EQU        $15
  2524. kSGReleaseSelect                EQU        $16
  2525. kSGGetMovieSelect                EQU        $17
  2526. kSGSetMaximumRecordTimeSelect    EQU        $18
  2527. kSGGetMaximumRecordTimeSelect    EQU        $19
  2528. kSGGetStorageSpaceRemainingSelect EQU        $1A
  2529. kSGGetTimeRemainingSelect        EQU        $1B
  2530. kSGGrabPictSelect                EQU        $1C
  2531. kSGGetLastMovieResIDSelect        EQU        $1D
  2532. kSGSetFlagsSelect                EQU        $1E
  2533. kSGGetFlagsSelect                EQU        $1F
  2534. kSGSetDataProcSelect            EQU        $20
  2535. kSGNewChannelFromComponentSelect EQU        $21
  2536. kSGDisposeDeviceListSelect        EQU        $22
  2537. kSGAppendDeviceListToMenuSelect    EQU        $23
  2538. kSGSetSettingsSelect            EQU        $24
  2539. kSGGetSettingsSelect            EQU        $25
  2540. kSGGetIndChannelSelect            EQU        $26
  2541. kSGUpdateSelect                    EQU        $27
  2542. kSGGetPauseSelect                EQU        $28
  2543. kSGSettingsDialogSelect            EQU        $29
  2544. kSGGetAlignmentProcSelect        EQU        $2A
  2545. kSGSetChannelSettingsSelect        EQU        $2B
  2546. kSGGetChannelSettingsSelect        EQU        $2C
  2547. kSGGetModeSelect                EQU        $2D
  2548. kSGSetDataRefSelect                EQU        $2E
  2549. kSGGetDataRefSelect                EQU        $2F
  2550. kSGNewOutputSelect                EQU        $30
  2551. kSGDisposeOutputSelect            EQU        $31
  2552. kSGSetOutputFlagsSelect            EQU        $32
  2553. kSGSetChannelOutputSelect        EQU        $33
  2554. kSGGetDataOutputStorageSpaceRemainingSelect EQU        $34
  2555. kSGWriteMovieDataSelect            EQU        $100
  2556. kSGAddFrameReferenceSelect        EQU        $101
  2557. kSGGetNextFrameReferenceSelect    EQU        $102
  2558. kSGGetTimeBaseSelect            EQU        $103
  2559. kSGSortDeviceListSelect            EQU        $104
  2560. kSGAddMovieDataSelect            EQU        $105
  2561. kSGChangedSourceSelect            EQU        $106
  2562. kSGCSetChannelUsageSelect        EQU        $80
  2563. kSGCGetChannelUsageSelect        EQU        $81
  2564. kSGCSetChannelBoundsSelect        EQU        $82
  2565. kSGCGetChannelBoundsSelect        EQU        $83
  2566. kSGCSetChannelVolumeSelect        EQU        $84
  2567. kSGCGetChannelVolumeSelect        EQU        $85
  2568. kSGCGetChannelInfoSelect        EQU        $86
  2569. kSGCSetChannelPlayFlagsSelect    EQU        $87
  2570. kSGCGetChannelPlayFlagsSelect    EQU        $88
  2571. kSGCSetChannelMaxFramesSelect    EQU        $89
  2572. kSGCGetChannelMaxFramesSelect    EQU        $8A
  2573. kSGCSetChannelRefConSelect        EQU        $8B
  2574. kSGCSetChannelClipSelect        EQU        $8C
  2575. kSGCGetChannelClipSelect        EQU        $8D
  2576. kSGCGetChannelSampleDescriptionSelect EQU        $8E
  2577. kSGCGetChannelDeviceListSelect    EQU        $8F
  2578. kSGCSetChannelDeviceSelect        EQU        $90
  2579. kSGCSetChannelMatrixSelect        EQU        $91
  2580. kSGCGetChannelMatrixSelect        EQU        $92
  2581. kSGCGetChannelTimeScaleSelect    EQU        $93
  2582. kSGCChannelPutPictureSelect        EQU        $94
  2583. kSGCChannelSetRequestedDataRateSelect EQU        $95
  2584. kSGCChannelGetRequestedDataRateSelect EQU        $96
  2585. kSGCChannelSetDataSourceNameSelect EQU        $97
  2586. kSGCChannelGetDataSourceNameSelect EQU        $98
  2587. kSGCInitChannelSelect            EQU        $180
  2588. kSGCWriteSamplesSelect            EQU        $181
  2589. kSGCGetDataRateSelect            EQU        $182
  2590. kSGCAlignChannelRectSelect        EQU        $183
  2591. kSGCPanelGetDitlSelect            EQU        $200
  2592. kSGCPanelGetTitleSelect            EQU        $201
  2593. kSGCPanelCanRunSelect            EQU        $202
  2594. kSGCPanelInstallSelect            EQU        $203
  2595. kSGCPanelEventSelect            EQU        $204
  2596. kSGCPanelItemSelect                EQU        $205
  2597. kSGCPanelRemoveSelect            EQU        $206
  2598. kSGCPanelSetGrabberSelect        EQU        $207
  2599. kSGCPanelSetResFileSelect        EQU        $208
  2600. kSGCPanelGetSettingsSelect        EQU        $209
  2601. kSGCPanelSetSettingsSelect        EQU        $20A
  2602. kSGCPanelValidateInputSelect    EQU        $20B
  2603. kSGCPanelSetEventFilterSelect    EQU        $20C
  2604. kSGCGetSrcVideoBoundsSelect        EQU        $100
  2605. kSGCSetVideoRectSelect            EQU        $101
  2606. kSGCGetVideoRectSelect            EQU        $102
  2607. kSGCGetVideoCompressorTypeSelect EQU        $103
  2608. kSGCSetVideoCompressorTypeSelect EQU        $104
  2609. kSGCSetVideoCompressorSelect    EQU        $105
  2610. kSGCGetVideoCompressorSelect    EQU        $106
  2611. kSGCGetVideoDigitizerComponentSelect EQU        $107
  2612. kSGCSetVideoDigitizerComponentSelect EQU        $108
  2613. kSGCVideoDigitizerChangedSelect    EQU        $109
  2614. kSGCSetVideoBottlenecksSelect    EQU        $10A
  2615. kSGCGetVideoBottlenecksSelect    EQU        $10B
  2616. kSGCGrabFrameSelect                EQU        $10C
  2617. kSGCGrabFrameCompleteSelect        EQU        $10D
  2618. kSGCDisplayFrameSelect            EQU        $10E
  2619. kSGCCompressFrameSelect            EQU        $10F
  2620. kSGCCompressFrameCompleteSelect    EQU        $110
  2621. kSGCAddFrameSelect                EQU        $111
  2622. kSGCTransferFrameForCompressSelect EQU        $112
  2623. kSGCSetCompressBufferSelect        EQU        $113
  2624. kSGCGetCompressBufferSelect        EQU        $114
  2625. kSGCGetBufferInfoSelect            EQU        $115
  2626. kSGCSetUseScreenBufferSelect    EQU        $116
  2627. kSGCGetUseScreenBufferSelect    EQU        $117
  2628. kSGCGrabCompressCompleteSelect    EQU        $118
  2629. kSGCDisplayCompressSelect        EQU        $119
  2630. kSGCSetFrameRateSelect            EQU        $11A
  2631. kSGCGetFrameRateSelect            EQU        $11B
  2632. kSGCSetSoundInputDriverSelect    EQU        $100
  2633. kSGCGetSoundInputDriverSelect    EQU        $101
  2634. kSGCSoundInputDriverChangedSelect EQU        $102
  2635. kSGCSetSoundRecordChunkSizeSelect EQU        $103
  2636. kSGCGetSoundRecordChunkSizeSelect EQU        $104
  2637. kSGCSetSoundInputRateSelect        EQU        $105
  2638. kSGCGetSoundInputRateSelect        EQU        $106
  2639. kSGCSetSoundInputParametersSelect EQU        $107
  2640. kSGCGetSoundInputParametersSelect EQU        $108
  2641.  
  2642. ; Standard type for video digitizers 
  2643. videoDigitizerComponentType        EQU        'vdig'
  2644. vdigInterfaceRev                EQU        2
  2645.  
  2646. ; Input Format Standards 
  2647. ntscIn                            EQU        0                    ; current input format 
  2648. currentIn                        EQU        0                    ; ntsc input format 
  2649. palIn                            EQU        1                    ; pal input format 
  2650. secamIn                            EQU        2                    ; secam input format 
  2651. ntscReallyIn                    EQU        3                    ; ntsc input format 
  2652.  
  2653. ; Input Formats 
  2654. compositeIn                        EQU        0                    ; input is composite format 
  2655. sVideoIn                        EQU        1                    ; input is sVideo format 
  2656. rgbComponentIn                    EQU        2                    ; input is rgb component format 
  2657. rgbComponentSyncIn                EQU        3                    ; input is rgb component format (sync on green?)
  2658. yuvComponentIn                    EQU        4                    ; input is yuv component format 
  2659. yuvComponentSyncIn                EQU        5                    ; input is yuv component format (sync on green?) 
  2660.  
  2661. ; Video Digitizer PlayThru States 
  2662. vdPlayThruOff                    EQU        0
  2663. vdPlayThruOn                    EQU        1
  2664.  
  2665. ; Input Color Space Modes 
  2666. vdDigitizerBW                    EQU        0                    ; black and white 
  2667. vdDigitizerRGB                    EQU        1                    ; rgb color 
  2668.  
  2669. ; Phase Lock Loop Modes 
  2670. vdBroadcastMode                    EQU        0                    ; Broadcast / Laser Disk video mode 
  2671. vdVTRMode                        EQU        1                    ; VCR / Magnetic media mode 
  2672.  
  2673. ; Field Select Options 
  2674. vdUseAnyField                    EQU        0                    ; Digitizers choice on field use 
  2675. vdUseOddField                    EQU        1                    ; Use odd field for half size vert and smaller 
  2676. vdUseEvenField                    EQU        2                    ; Use even field for half size vert and smaller 
  2677.  
  2678. ; vdig types 
  2679. vdTypeBasic                        EQU        0                    ; basic, no clipping 
  2680. vdTypeAlpha                        EQU        1                    ; supports clipping with alpha channel 
  2681. vdTypeMask                        EQU        2                    ; supports clipping with mask plane 
  2682. vdTypeKey                        EQU        3                    ; supports clipping with key color(s) 
  2683.  
  2684. ; Digitizer Input Capability/Current Flags    
  2685. digiInDoesNTSC                    EQU        1 << 0                ; digitizer supports NTSC input format 
  2686. digiInDoesPAL                    EQU        1 << 1                ; digitizer supports PAL input format 
  2687. digiInDoesSECAM                    EQU        1 << 2                ; digitizer supports SECAM input format 
  2688. digiInDoesGenLock                EQU        1 << 7                ; digitizer does genlock 
  2689. digiInDoesComposite                EQU        1 << 8                ; digitizer supports composite input type 
  2690. digiInDoesSVideo                EQU        1 << 9                ; digitizer supports S-Video input type 
  2691. digiInDoesComponent                EQU        1 << 10                ; digitizer supports component = rgb, input type 
  2692. digiInVTR_Broadcast                EQU        1 << 11                ; digitizer can differentiate between the two 
  2693. digiInDoesColor                    EQU        1 << 12                ; digitizer supports color 
  2694. digiInDoesBW                    EQU        1 << 13                ; digitizer supports black & white 
  2695. ; Digitizer Input Current Flags = these are valid only during active operating conditions,    
  2696. digiInSignalLock                EQU        1 << 31                ; digitizer detects input signal is locked, this bit = horiz lock || vertical lock 
  2697.  
  2698. ; Digitizer Output Capability/Current Flags 
  2699. digiOutDoes1                    EQU        1 << 0                ; digitizer supports 1 bit pixels 
  2700. digiOutDoes2                    EQU        1 << 1                ; digitizer supports 2 bit pixels 
  2701. digiOutDoes4                    EQU        1 << 2                ; digitizer supports 4 bit pixels 
  2702. digiOutDoes8                    EQU        1 << 3                ; digitizer supports 8 bit pixels 
  2703. digiOutDoes16                    EQU        1 << 4                ; digitizer supports 16 bit pixels 
  2704. digiOutDoes32                    EQU        1 << 5                ; digitizer supports 32 bit pixels 
  2705. digiOutDoesDither                EQU        1 << 6                ; digitizer dithers in indexed modes 
  2706. digiOutDoesStretch                EQU        1 << 7                ; digitizer can arbitrarily stretch 
  2707. digiOutDoesShrink                EQU        1 << 8                ; digitizer can arbitrarily shrink 
  2708. digiOutDoesMask                    EQU        1 << 9                ; digitizer can mask to clipping regions 
  2709. digiOutDoesDouble                EQU        1 << 11                ; digitizer can stretch to exactly double size 
  2710. digiOutDoesQuad                    EQU        1 << 12                ; digitizer can stretch exactly quadruple size 
  2711. digiOutDoesQuarter                EQU        1 << 13                ; digitizer can shrink to exactly quarter size 
  2712. digiOutDoesSixteenth            EQU        1 << 14                ; digitizer can shrink to exactly sixteenth size 
  2713. digiOutDoesRotate                EQU        1 << 15                ; digitizer supports rotate transformations 
  2714. digiOutDoesHorizFlip            EQU        1 << 16                ; digitizer supports horizontal flips Sx < 0 
  2715. digiOutDoesVertFlip                EQU        1 << 17                ; digitizer supports vertical flips Sy < 0 
  2716. digiOutDoesSkew                    EQU        1 << 18                ; digitizer supports skew = shear,twist, 
  2717. digiOutDoesBlend                EQU        1 << 19
  2718. digiOutDoesWarp                    EQU        1 << 20
  2719. digiOutDoesHW_DMA                EQU        1 << 21                ; digitizer not constrained to local device 
  2720. digiOutDoesHWPlayThru            EQU        1 << 22                ; digitizer doesn't need time to play thru 
  2721. digiOutDoesILUT                    EQU        1 << 23                ; digitizer does inverse LUT for index modes 
  2722. digiOutDoesKeyColor                EQU        1 << 24                ; digitizer does key color functions too 
  2723. digiOutDoesAsyncGrabs            EQU        1 << 25                ; digitizer supports async grabs 
  2724. digiOutDoesUnreadableScreenBits    EQU        1 << 26                ; playthru doesn't generate readable bits on screen
  2725. digiOutDoesCompress                EQU        1 << 27                ; supports alternate output data types 
  2726. digiOutDoesCompressOnly            EQU        1 << 28                ; can't provide raw frames anywhere 
  2727. digiOutDoesPlayThruDuringCompress EQU        1 << 29            ; digi can do playthru while providing compressed data 
  2728.  
  2729. ; Types 
  2730. ; typedef ComponentInstance  VideoDigitizerComponent
  2731. ; typedef ComponentResult     VideoDigitizerError
  2732. DigitizerInfo             RECORD    0
  2733. vdigType                 ds.w   1        ; offset: $0 (0)
  2734. inputCapabilityFlags     ds.l   1        ; offset: $2 (2)
  2735. outputCapabilityFlags     ds.l   1        ; offset: $6 (6)
  2736. inputCurrentFlags         ds.l   1        ; offset: $A (10)
  2737. outputCurrentFlags         ds.l   1        ; offset: $E (14)
  2738. slot                     ds.w   1        ; offset: $12 (18)        ; temporary for connection purposes 
  2739. gdh                         ds.l   1        ; offset: $14 (20)        ; temporary for digitizers that have preferred screen 
  2740. maskgdh                     ds.l   1        ; offset: $18 (24)        ; temporary for digitizers that have mask planes 
  2741. minDestHeight             ds.w   1        ; offset: $1C (28)        ; Smallest resizable height 
  2742. minDestWidth             ds.w   1        ; offset: $1E (30)        ; Smallest resizable width 
  2743. maxDestHeight             ds.w   1        ; offset: $20 (32)        ; Largest resizable height 
  2744. maxDestWidth             ds.w   1        ; offset: $22 (34)        ; Largest resizable height 
  2745. blendLevels                 ds.w   1        ; offset: $24 (36)        ; Number of blend levels supported (2 if 1 bit mask) 
  2746. reserved                 ds.l   1        ; offset: $26 (38)        ; reserved 
  2747. sizeof                     EQU *            ; size:   $2A (42)
  2748.                         ENDR
  2749.  
  2750. ; typedef struct DigitizerInfo  DigitizerInfo
  2751. VdigType                 RECORD    0
  2752. digType                     ds.l   1        ; offset: $0 (0)
  2753. reserved                 ds.l   1        ; offset: $4 (4)
  2754. sizeof                     EQU *            ; size:   $8 (8)
  2755.                         ENDR
  2756.  
  2757. ; typedef struct VdigType     VdigType
  2758. VdigTypeList             RECORD    0
  2759. count                     ds.w   1        ; offset: $0 (0)
  2760. list                     ds     VdigType ; offset: $2 (2)
  2761. sizeof                     EQU *            ; size:   $A (10)
  2762.                         ENDR
  2763.  
  2764. ; typedef struct VdigTypeList  VdigTypeList
  2765. VdigBufferRec             RECORD    0
  2766. dest                     ds.l   1        ; offset: $0 (0)
  2767. location                 ds     Point    ; offset: $4 (4)
  2768. reserved                 ds.l   1        ; offset: $8 (8)
  2769. sizeof                     EQU *            ; size:   $C (12)
  2770.                         ENDR
  2771.  
  2772. ; typedef struct VdigBufferRec  VdigBufferRec
  2773. VdigBufferRecList         RECORD    0
  2774. count                     ds.w   1        ; offset: $0 (0)
  2775. matrix                     ds.l   1        ; offset: $2 (2)
  2776. mask                     ds.l   1        ; offset: $6 (6)
  2777. list                     ds     VdigBufferRec ; offset: $A (10)
  2778. sizeof                     EQU *            ; size:   $16 (22)
  2779.                         ENDR
  2780.  
  2781. ; typedef struct VdigBufferRecList  VdigBufferRecList, *VdigBufferRecListPtr, **VdigBufferRecListHandle
  2782. VDCompressionList         RECORD    0
  2783. codec                     ds.l   1        ; offset: $0 (0)
  2784. cType                     ds.l   1        ; offset: $4 (4)
  2785. typeName                 ds.l   16        ; offset: $8 (8)
  2786. name                     ds.l   16        ; offset: $48 (72)
  2787. formatFlags                 ds.l   1        ; offset: $88 (136)
  2788. compressFlags             ds.l   1        ; offset: $8C (140)
  2789. reserved                 ds.l   1        ; offset: $90 (144)
  2790. sizeof                     EQU *            ; size:   $94 (148)
  2791.                         ENDR
  2792.  
  2793. ; typedef struct VDCompressionList  VDCompressionList, *VDCompressionListPtr, **VDCompressionListHandle
  2794.  
  2795. dmaDepth1                        EQU        1
  2796. dmaDepth2                        EQU        2
  2797. dmaDepth4                        EQU        4
  2798. dmaDepth8                        EQU        8
  2799. dmaDepth16                        EQU        16
  2800. dmaDepth32                        EQU        32
  2801. dmaDepth2Gray                    EQU        64
  2802. dmaDepth4Gray                    EQU        128
  2803. dmaDepth8Gray                    EQU        256
  2804.  
  2805. kVDIGControlledFrameRate        EQU        -1
  2806.  
  2807. ; number of vdig calls
  2808. kvdigSelectors                    EQU        86
  2809.  
  2810. ;
  2811. ; pascal VideoDigitizerError VDGetMaxSrcRect(VideoDigitizerComponent ci, short inputStd, Rect *maxSrcRect)
  2812. ;
  2813.     IF ¬ GENERATINGCFM THEN
  2814.         Macro
  2815.         _VDGetMaxSrcRect
  2816.             dc.w     $2F3C
  2817.             dc.w     $0006
  2818.             dc.w     $0001
  2819.             moveq    #0,d0
  2820.             dc.w     $A82A
  2821.         EndM
  2822.     ELSE
  2823.         IMPORT_CFM_FUNCTION    VDGetMaxSrcRect
  2824.     ENDIF
  2825.  
  2826. ;
  2827. ; pascal VideoDigitizerError VDGetActiveSrcRect(VideoDigitizerComponent ci, short inputStd, Rect *activeSrcRect)
  2828. ;
  2829.     IF ¬ GENERATINGCFM THEN
  2830.         Macro
  2831.         _VDGetActiveSrcRect
  2832.             dc.w     $2F3C
  2833.             dc.w     $0006
  2834.             dc.w     $0002
  2835.             moveq    #0,d0
  2836.             dc.w     $A82A
  2837.         EndM
  2838.     ELSE
  2839.         IMPORT_CFM_FUNCTION    VDGetActiveSrcRect
  2840.     ENDIF
  2841.  
  2842. ;
  2843. ; pascal VideoDigitizerError VDSetDigitizerRect(VideoDigitizerComponent ci, Rect *digitizerRect)
  2844. ;
  2845.     IF ¬ GENERATINGCFM THEN
  2846.         Macro
  2847.         _VDSetDigitizerRect
  2848.             dc.w     $2F3C
  2849.             dc.w     $0004
  2850.             dc.w     $0003
  2851.             moveq    #0,d0
  2852.             dc.w     $A82A
  2853.         EndM
  2854.     ELSE
  2855.         IMPORT_CFM_FUNCTION    VDSetDigitizerRect
  2856.     ENDIF
  2857.  
  2858. ;
  2859. ; pascal VideoDigitizerError VDGetDigitizerRect(VideoDigitizerComponent ci, Rect *digitizerRect)
  2860. ;
  2861.     IF ¬ GENERATINGCFM THEN
  2862.         Macro
  2863.         _VDGetDigitizerRect
  2864.             dc.w     $2F3C
  2865.             dc.w     $0004
  2866.             dc.w     $0004
  2867.             moveq    #0,d0
  2868.             dc.w     $A82A
  2869.         EndM
  2870.     ELSE
  2871.         IMPORT_CFM_FUNCTION    VDGetDigitizerRect
  2872.     ENDIF
  2873.  
  2874. ;
  2875. ; pascal VideoDigitizerError VDGetVBlankRect(VideoDigitizerComponent ci, short inputStd, Rect *vBlankRect)
  2876. ;
  2877.     IF ¬ GENERATINGCFM THEN
  2878.         Macro
  2879.         _VDGetVBlankRect
  2880.             dc.w     $2F3C
  2881.             dc.w     $0006
  2882.             dc.w     $0005
  2883.             moveq    #0,d0
  2884.             dc.w     $A82A
  2885.         EndM
  2886.     ELSE
  2887.         IMPORT_CFM_FUNCTION    VDGetVBlankRect
  2888.     ENDIF
  2889.  
  2890. ;
  2891. ; pascal VideoDigitizerError VDGetMaskPixMap(VideoDigitizerComponent ci, PixMapHandle maskPixMap)
  2892. ;
  2893.     IF ¬ GENERATINGCFM THEN
  2894.         Macro
  2895.         _VDGetMaskPixMap
  2896.             dc.w     $2F3C
  2897.             dc.w     $0004
  2898.             dc.w     $0006
  2899.             moveq    #0,d0
  2900.             dc.w     $A82A
  2901.         EndM
  2902.     ELSE
  2903.         IMPORT_CFM_FUNCTION    VDGetMaskPixMap
  2904.     ENDIF
  2905.  
  2906. ;
  2907. ; pascal VideoDigitizerError VDGetPlayThruDestination(VideoDigitizerComponent ci, PixMapHandle *dest, Rect *destRect, MatrixRecord *m, RgnHandle *mask)
  2908. ;
  2909.     IF ¬ GENERATINGCFM THEN
  2910.         Macro
  2911.         _VDGetPlayThruDestination
  2912.             dc.w     $2F3C
  2913.             dc.w     $0010
  2914.             dc.w     $0008
  2915.             moveq    #0,d0
  2916.             dc.w     $A82A
  2917.         EndM
  2918.     ELSE
  2919.         IMPORT_CFM_FUNCTION    VDGetPlayThruDestination
  2920.     ENDIF
  2921.  
  2922. ;
  2923. ; pascal VideoDigitizerError VDUseThisCLUT(VideoDigitizerComponent ci, CTabHandle colorTableHandle)
  2924. ;
  2925.     IF ¬ GENERATINGCFM THEN
  2926.         Macro
  2927.         _VDUseThisCLUT
  2928.             dc.w     $2F3C
  2929.             dc.w     $0004
  2930.             dc.w     $0009
  2931.             moveq    #0,d0
  2932.             dc.w     $A82A
  2933.         EndM
  2934.     ELSE
  2935.         IMPORT_CFM_FUNCTION    VDUseThisCLUT
  2936.     ENDIF
  2937.  
  2938. ;
  2939. ; pascal VideoDigitizerError VDSetInputGammaValue(VideoDigitizerComponent ci, Fixed channel1, Fixed channel2, Fixed channel3)
  2940. ;
  2941.     IF ¬ GENERATINGCFM THEN
  2942.         Macro
  2943.         _VDSetInputGammaValue
  2944.             dc.w     $2F3C
  2945.             dc.w     $000C
  2946.             dc.w     $000A
  2947.             moveq    #0,d0
  2948.             dc.w     $A82A
  2949.         EndM
  2950.     ELSE
  2951.         IMPORT_CFM_FUNCTION    VDSetInputGammaValue
  2952.     ENDIF
  2953.  
  2954. ;
  2955. ; pascal VideoDigitizerError VDGetInputGammaValue(VideoDigitizerComponent ci, Fixed *channel1, Fixed *channel2, Fixed *channel3)
  2956. ;
  2957.     IF ¬ GENERATINGCFM THEN
  2958.         Macro
  2959.         _VDGetInputGammaValue
  2960.             dc.w     $2F3C
  2961.             dc.w     $000C
  2962.             dc.w     $000B
  2963.             moveq    #0,d0
  2964.             dc.w     $A82A
  2965.         EndM
  2966.     ELSE
  2967.         IMPORT_CFM_FUNCTION    VDGetInputGammaValue
  2968.     ENDIF
  2969.  
  2970. ;
  2971. ; pascal VideoDigitizerError VDSetBrightness(VideoDigitizerComponent ci, unsigned short *brightness)
  2972. ;
  2973.     IF ¬ GENERATINGCFM THEN
  2974.         Macro
  2975.         _VDSetBrightness
  2976.             dc.w     $2F3C
  2977.             dc.w     $0004
  2978.             dc.w     $000C
  2979.             moveq    #0,d0
  2980.             dc.w     $A82A
  2981.         EndM
  2982.     ELSE
  2983.         IMPORT_CFM_FUNCTION    VDSetBrightness
  2984.     ENDIF
  2985.  
  2986. ;
  2987. ; pascal VideoDigitizerError VDGetBrightness(VideoDigitizerComponent ci, unsigned short *brightness)
  2988. ;
  2989.     IF ¬ GENERATINGCFM THEN
  2990.         Macro
  2991.         _VDGetBrightness
  2992.             dc.w     $2F3C
  2993.             dc.w     $0004
  2994.             dc.w     $000D
  2995.             moveq    #0,d0
  2996.             dc.w     $A82A
  2997.         EndM
  2998.     ELSE
  2999.         IMPORT_CFM_FUNCTION    VDGetBrightness
  3000.     ENDIF
  3001.  
  3002. ;
  3003. ; pascal VideoDigitizerError VDSetContrast(VideoDigitizerComponent ci, unsigned short *contrast)
  3004. ;
  3005.     IF ¬ GENERATINGCFM THEN
  3006.         Macro
  3007.         _VDSetContrast
  3008.             dc.w     $2F3C
  3009.             dc.w     $0004
  3010.             dc.w     $000E
  3011.             moveq    #0,d0
  3012.             dc.w     $A82A
  3013.         EndM
  3014.     ELSE
  3015.         IMPORT_CFM_FUNCTION    VDSetContrast
  3016.     ENDIF
  3017.  
  3018. ;
  3019. ; pascal VideoDigitizerError VDSetHue(VideoDigitizerComponent ci, unsigned short *hue)
  3020. ;
  3021.     IF ¬ GENERATINGCFM THEN
  3022.         Macro
  3023.         _VDSetHue
  3024.             dc.w     $2F3C
  3025.             dc.w     $0004
  3026.             dc.w     $000F
  3027.             moveq    #0,d0
  3028.             dc.w     $A82A
  3029.         EndM
  3030.     ELSE
  3031.         IMPORT_CFM_FUNCTION    VDSetHue
  3032.     ENDIF
  3033.  
  3034. ;
  3035. ; pascal VideoDigitizerError VDSetSharpness(VideoDigitizerComponent ci, unsigned short *sharpness)
  3036. ;
  3037.     IF ¬ GENERATINGCFM THEN
  3038.         Macro
  3039.         _VDSetSharpness
  3040.             dc.w     $2F3C
  3041.             dc.w     $0004
  3042.             dc.w     $0010
  3043.             moveq    #0,d0
  3044.             dc.w     $A82A
  3045.         EndM
  3046.     ELSE
  3047.         IMPORT_CFM_FUNCTION    VDSetSharpness
  3048.     ENDIF
  3049.  
  3050. ;
  3051. ; pascal VideoDigitizerError VDSetSaturation(VideoDigitizerComponent ci, unsigned short *saturation)
  3052. ;
  3053.     IF ¬ GENERATINGCFM THEN
  3054.         Macro
  3055.         _VDSetSaturation
  3056.             dc.w     $2F3C
  3057.             dc.w     $0004
  3058.             dc.w     $0011
  3059.             moveq    #0,d0
  3060.             dc.w     $A82A
  3061.         EndM
  3062.     ELSE
  3063.         IMPORT_CFM_FUNCTION    VDSetSaturation
  3064.     ENDIF
  3065.  
  3066. ;
  3067. ; pascal VideoDigitizerError VDGetContrast(VideoDigitizerComponent ci, unsigned short *contrast)
  3068. ;
  3069.     IF ¬ GENERATINGCFM THEN
  3070.         Macro
  3071.         _VDGetContrast
  3072.             dc.w     $2F3C
  3073.             dc.w     $0004
  3074.             dc.w     $0012
  3075.             moveq    #0,d0
  3076.             dc.w     $A82A
  3077.         EndM
  3078.     ELSE
  3079.         IMPORT_CFM_FUNCTION    VDGetContrast
  3080.     ENDIF
  3081.  
  3082. ;
  3083. ; pascal VideoDigitizerError VDGetHue(VideoDigitizerComponent ci, unsigned short *hue)
  3084. ;
  3085.     IF ¬ GENERATINGCFM THEN
  3086.         Macro
  3087.         _VDGetHue
  3088.             dc.w     $2F3C
  3089.             dc.w     $0004
  3090.             dc.w     $0013
  3091.             moveq    #0,d0
  3092.             dc.w     $A82A
  3093.         EndM
  3094.     ELSE
  3095.         IMPORT_CFM_FUNCTION    VDGetHue
  3096.     ENDIF
  3097.  
  3098. ;
  3099. ; pascal VideoDigitizerError VDGetSharpness(VideoDigitizerComponent ci, unsigned short *sharpness)
  3100. ;
  3101.     IF ¬ GENERATINGCFM THEN
  3102.         Macro
  3103.         _VDGetSharpness
  3104.             dc.w     $2F3C
  3105.             dc.w     $0004
  3106.             dc.w     $0014
  3107.             moveq    #0,d0
  3108.             dc.w     $A82A
  3109.         EndM
  3110.     ELSE
  3111.         IMPORT_CFM_FUNCTION    VDGetSharpness
  3112.     ENDIF
  3113.  
  3114. ;
  3115. ; pascal VideoDigitizerError VDGetSaturation(VideoDigitizerComponent ci, unsigned short *saturation)
  3116. ;
  3117.     IF ¬ GENERATINGCFM THEN
  3118.         Macro
  3119.         _VDGetSaturation
  3120.             dc.w     $2F3C
  3121.             dc.w     $0004
  3122.             dc.w     $0015
  3123.             moveq    #0,d0
  3124.             dc.w     $A82A
  3125.         EndM
  3126.     ELSE
  3127.         IMPORT_CFM_FUNCTION    VDGetSaturation
  3128.     ENDIF
  3129.  
  3130. ;
  3131. ; pascal VideoDigitizerError VDGrabOneFrame(VideoDigitizerComponent ci)
  3132. ;
  3133.     IF ¬ GENERATINGCFM THEN
  3134.         Macro
  3135.         _VDGrabOneFrame
  3136.             dc.w     $2F3C
  3137.             dc.w     $0000
  3138.             dc.w     $0016
  3139.             moveq    #0,d0
  3140.             dc.w     $A82A
  3141.         EndM
  3142.     ELSE
  3143.         IMPORT_CFM_FUNCTION    VDGrabOneFrame
  3144.     ENDIF
  3145.  
  3146. ;
  3147. ; pascal VideoDigitizerError VDGetMaxAuxBuffer(VideoDigitizerComponent ci, PixMapHandle *pm, Rect *r)
  3148. ;
  3149.     IF ¬ GENERATINGCFM THEN
  3150.         Macro
  3151.         _VDGetMaxAuxBuffer
  3152.             dc.w     $2F3C
  3153.             dc.w     $0008
  3154.             dc.w     $0017
  3155.             moveq    #0,d0
  3156.             dc.w     $A82A
  3157.         EndM
  3158.     ELSE
  3159.         IMPORT_CFM_FUNCTION    VDGetMaxAuxBuffer
  3160.     ENDIF
  3161.  
  3162. ;
  3163. ; pascal VideoDigitizerError VDGetDigitizerInfo(VideoDigitizerComponent ci, DigitizerInfo *info)
  3164. ;
  3165.     IF ¬ GENERATINGCFM THEN
  3166.         Macro
  3167.         _VDGetDigitizerInfo
  3168.             dc.w     $2F3C
  3169.             dc.w     $0004
  3170.             dc.w     $0019
  3171.             moveq    #0,d0
  3172.             dc.w     $A82A
  3173.         EndM
  3174.     ELSE
  3175.         IMPORT_CFM_FUNCTION    VDGetDigitizerInfo
  3176.     ENDIF
  3177.  
  3178. ;
  3179. ; pascal VideoDigitizerError VDGetCurrentFlags(VideoDigitizerComponent ci, long *inputCurrentFlag, long *outputCurrentFlag)
  3180. ;
  3181.     IF ¬ GENERATINGCFM THEN
  3182.         Macro
  3183.         _VDGetCurrentFlags
  3184.             dc.w     $2F3C
  3185.             dc.w     $0008
  3186.             dc.w     $001A
  3187.             moveq    #0,d0
  3188.             dc.w     $A82A
  3189.         EndM
  3190.     ELSE
  3191.         IMPORT_CFM_FUNCTION    VDGetCurrentFlags
  3192.     ENDIF
  3193.  
  3194. ;
  3195. ; pascal VideoDigitizerError VDSetKeyColor(VideoDigitizerComponent ci, long index)
  3196. ;
  3197.     IF ¬ GENERATINGCFM THEN
  3198.         Macro
  3199.         _VDSetKeyColor
  3200.             dc.w     $2F3C
  3201.             dc.w     $0004
  3202.             dc.w     $001B
  3203.             moveq    #0,d0
  3204.             dc.w     $A82A
  3205.         EndM
  3206.     ELSE
  3207.         IMPORT_CFM_FUNCTION    VDSetKeyColor
  3208.     ENDIF
  3209.  
  3210. ;
  3211. ; pascal VideoDigitizerError VDGetKeyColor(VideoDigitizerComponent ci, long *index)
  3212. ;
  3213.     IF ¬ GENERATINGCFM THEN
  3214.         Macro
  3215.         _VDGetKeyColor
  3216.             dc.w     $2F3C
  3217.             dc.w     $0004
  3218.             dc.w     $001C
  3219.             moveq    #0,d0
  3220.             dc.w     $A82A
  3221.         EndM
  3222.     ELSE
  3223.         IMPORT_CFM_FUNCTION    VDGetKeyColor
  3224.     ENDIF
  3225.  
  3226. ;
  3227. ; pascal VideoDigitizerError VDAddKeyColor(VideoDigitizerComponent ci, long *index)
  3228. ;
  3229.     IF ¬ GENERATINGCFM THEN
  3230.         Macro
  3231.         _VDAddKeyColor
  3232.             dc.w     $2F3C
  3233.             dc.w     $0004
  3234.             dc.w     $001D
  3235.             moveq    #0,d0
  3236.             dc.w     $A82A
  3237.         EndM
  3238.     ELSE
  3239.         IMPORT_CFM_FUNCTION    VDAddKeyColor
  3240.     ENDIF
  3241.  
  3242. ;
  3243. ; pascal VideoDigitizerError VDGetNextKeyColor(VideoDigitizerComponent ci, long index)
  3244. ;
  3245.     IF ¬ GENERATINGCFM THEN
  3246.         Macro
  3247.         _VDGetNextKeyColor
  3248.             dc.w     $2F3C
  3249.             dc.w     $0004
  3250.             dc.w     $001E
  3251.             moveq    #0,d0
  3252.             dc.w     $A82A
  3253.         EndM
  3254.     ELSE
  3255.         IMPORT_CFM_FUNCTION    VDGetNextKeyColor
  3256.     ENDIF
  3257.  
  3258. ;
  3259. ; pascal VideoDigitizerError VDSetKeyColorRange(VideoDigitizerComponent ci, RGBColor *minRGB, RGBColor *maxRGB)
  3260. ;
  3261.     IF ¬ GENERATINGCFM THEN
  3262.         Macro
  3263.         _VDSetKeyColorRange
  3264.             dc.w     $2F3C
  3265.             dc.w     $0008
  3266.             dc.w     $001F
  3267.             moveq    #0,d0
  3268.             dc.w     $A82A
  3269.         EndM
  3270.     ELSE
  3271.         IMPORT_CFM_FUNCTION    VDSetKeyColorRange
  3272.     ENDIF
  3273.  
  3274. ;
  3275. ; pascal VideoDigitizerError VDGetKeyColorRange(VideoDigitizerComponent ci, RGBColor *minRGB, RGBColor *maxRGB)
  3276. ;
  3277.     IF ¬ GENERATINGCFM THEN
  3278.         Macro
  3279.         _VDGetKeyColorRange
  3280.             dc.w     $2F3C
  3281.             dc.w     $0008
  3282.             dc.w     $0020
  3283.             moveq    #0,d0
  3284.             dc.w     $A82A
  3285.         EndM
  3286.     ELSE
  3287.         IMPORT_CFM_FUNCTION    VDGetKeyColorRange
  3288.     ENDIF
  3289.  
  3290. ;
  3291. ; pascal VideoDigitizerError VDSetDigitizerUserInterrupt(VideoDigitizerComponent ci, long flags, VdigIntUPP userInterruptProc, long refcon)
  3292. ;
  3293.     IF ¬ GENERATINGCFM THEN
  3294.         Macro
  3295.         _VDSetDigitizerUserInterrupt
  3296.             dc.w     $2F3C
  3297.             dc.w     $000C
  3298.             dc.w     $0021
  3299.             moveq    #0,d0
  3300.             dc.w     $A82A
  3301.         EndM
  3302.     ELSE
  3303.         IMPORT_CFM_FUNCTION    VDSetDigitizerUserInterrupt
  3304.     ENDIF
  3305.  
  3306. ;
  3307. ; pascal VideoDigitizerError VDSetInputColorSpaceMode(VideoDigitizerComponent ci, short colorSpaceMode)
  3308. ;
  3309.     IF ¬ GENERATINGCFM THEN
  3310.         Macro
  3311.         _VDSetInputColorSpaceMode
  3312.             dc.w     $2F3C
  3313.             dc.w     $0002
  3314.             dc.w     $0022
  3315.             moveq    #0,d0
  3316.             dc.w     $A82A
  3317.         EndM
  3318.     ELSE
  3319.         IMPORT_CFM_FUNCTION    VDSetInputColorSpaceMode
  3320.     ENDIF
  3321.  
  3322. ;
  3323. ; pascal VideoDigitizerError VDGetInputColorSpaceMode(VideoDigitizerComponent ci, short *colorSpaceMode)
  3324. ;
  3325.     IF ¬ GENERATINGCFM THEN
  3326.         Macro
  3327.         _VDGetInputColorSpaceMode
  3328.             dc.w     $2F3C
  3329.             dc.w     $0004
  3330.             dc.w     $0023
  3331.             moveq    #0,d0
  3332.             dc.w     $A82A
  3333.         EndM
  3334.     ELSE
  3335.         IMPORT_CFM_FUNCTION    VDGetInputColorSpaceMode
  3336.     ENDIF
  3337.  
  3338. ;
  3339. ; pascal VideoDigitizerError VDSetClipState(VideoDigitizerComponent ci, short clipEnable)
  3340. ;
  3341.     IF ¬ GENERATINGCFM THEN
  3342.         Macro
  3343.         _VDSetClipState
  3344.             dc.w     $2F3C
  3345.             dc.w     $0002
  3346.             dc.w     $0024
  3347.             moveq    #0,d0
  3348.             dc.w     $A82A
  3349.         EndM
  3350.     ELSE
  3351.         IMPORT_CFM_FUNCTION    VDSetClipState
  3352.     ENDIF
  3353.  
  3354. ;
  3355. ; pascal VideoDigitizerError VDGetClipState(VideoDigitizerComponent ci, short *clipEnable)
  3356. ;
  3357.     IF ¬ GENERATINGCFM THEN
  3358.         Macro
  3359.         _VDGetClipState
  3360.             dc.w     $2F3C
  3361.             dc.w     $0004
  3362.             dc.w     $0025
  3363.             moveq    #0,d0
  3364.             dc.w     $A82A
  3365.         EndM
  3366.     ELSE
  3367.         IMPORT_CFM_FUNCTION    VDGetClipState
  3368.     ENDIF
  3369.  
  3370. ;
  3371. ; pascal VideoDigitizerError VDSetClipRgn(VideoDigitizerComponent ci, RgnHandle clipRegion)
  3372. ;
  3373.     IF ¬ GENERATINGCFM THEN
  3374.         Macro
  3375.         _VDSetClipRgn
  3376.             dc.w     $2F3C
  3377.             dc.w     $0004
  3378.             dc.w     $0026
  3379.             moveq    #0,d0
  3380.             dc.w     $A82A
  3381.         EndM
  3382.     ELSE
  3383.         IMPORT_CFM_FUNCTION    VDSetClipRgn
  3384.     ENDIF
  3385.  
  3386. ;
  3387. ; pascal VideoDigitizerError VDClearClipRgn(VideoDigitizerComponent ci, RgnHandle clipRegion)
  3388. ;
  3389.     IF ¬ GENERATINGCFM THEN
  3390.         Macro
  3391.         _VDClearClipRgn
  3392.             dc.w     $2F3C
  3393.             dc.w     $0004
  3394.             dc.w     $0027
  3395.             moveq    #0,d0
  3396.             dc.w     $A82A
  3397.         EndM
  3398.     ELSE
  3399.         IMPORT_CFM_FUNCTION    VDClearClipRgn
  3400.     ENDIF
  3401.  
  3402. ;
  3403. ; pascal VideoDigitizerError VDGetCLUTInUse(VideoDigitizerComponent ci, CTabHandle *colorTableHandle)
  3404. ;
  3405.     IF ¬ GENERATINGCFM THEN
  3406.         Macro
  3407.         _VDGetCLUTInUse
  3408.             dc.w     $2F3C
  3409.             dc.w     $0004
  3410.             dc.w     $0028
  3411.             moveq    #0,d0
  3412.             dc.w     $A82A
  3413.         EndM
  3414.     ELSE
  3415.         IMPORT_CFM_FUNCTION    VDGetCLUTInUse
  3416.     ENDIF
  3417.  
  3418. ;
  3419. ; pascal VideoDigitizerError VDSetPLLFilterType(VideoDigitizerComponent ci, short pllType)
  3420. ;
  3421.     IF ¬ GENERATINGCFM THEN
  3422.         Macro
  3423.         _VDSetPLLFilterType
  3424.             dc.w     $2F3C
  3425.             dc.w     $0002
  3426.             dc.w     $0029
  3427.             moveq    #0,d0
  3428.             dc.w     $A82A
  3429.         EndM
  3430.     ELSE
  3431.         IMPORT_CFM_FUNCTION    VDSetPLLFilterType
  3432.     ENDIF
  3433.  
  3434. ;
  3435. ; pascal VideoDigitizerError VDGetPLLFilterType(VideoDigitizerComponent ci, short *pllType)
  3436. ;
  3437.     IF ¬ GENERATINGCFM THEN
  3438.         Macro
  3439.         _VDGetPLLFilterType
  3440.             dc.w     $2F3C
  3441.             dc.w     $0004
  3442.             dc.w     $002A
  3443.             moveq    #0,d0
  3444.             dc.w     $A82A
  3445.         EndM
  3446.     ELSE
  3447.         IMPORT_CFM_FUNCTION    VDGetPLLFilterType
  3448.     ENDIF
  3449.  
  3450. ;
  3451. ; pascal VideoDigitizerError VDGetMaskandValue(VideoDigitizerComponent ci, unsigned short blendLevel, long *mask, long *value)
  3452. ;
  3453.     IF ¬ GENERATINGCFM THEN
  3454.         Macro
  3455.         _VDGetMaskandValue
  3456.             dc.w     $2F3C
  3457.             dc.w     $000A
  3458.             dc.w     $002B
  3459.             moveq    #0,d0
  3460.             dc.w     $A82A
  3461.         EndM
  3462.     ELSE
  3463.         IMPORT_CFM_FUNCTION    VDGetMaskandValue
  3464.     ENDIF
  3465.  
  3466. ;
  3467. ; pascal VideoDigitizerError VDSetMasterBlendLevel(VideoDigitizerComponent ci, unsigned short *blendLevel)
  3468. ;
  3469.     IF ¬ GENERATINGCFM THEN
  3470.         Macro
  3471.         _VDSetMasterBlendLevel
  3472.             dc.w     $2F3C
  3473.             dc.w     $0004
  3474.             dc.w     $002C
  3475.             moveq    #0,d0
  3476.             dc.w     $A82A
  3477.         EndM
  3478.     ELSE
  3479.         IMPORT_CFM_FUNCTION    VDSetMasterBlendLevel
  3480.     ENDIF
  3481.  
  3482. ;
  3483. ; pascal VideoDigitizerError VDSetPlayThruDestination(VideoDigitizerComponent ci, PixMapHandle dest, Rect *destRect, MatrixRecord *m, RgnHandle mask)
  3484. ;
  3485.     IF ¬ GENERATINGCFM THEN
  3486.         Macro
  3487.         _VDSetPlayThruDestination
  3488.             dc.w     $2F3C
  3489.             dc.w     $0010
  3490.             dc.w     $002D
  3491.             moveq    #0,d0
  3492.             dc.w     $A82A
  3493.         EndM
  3494.     ELSE
  3495.         IMPORT_CFM_FUNCTION    VDSetPlayThruDestination
  3496.     ENDIF
  3497.  
  3498. ;
  3499. ; pascal VideoDigitizerError VDSetPlayThruOnOff(VideoDigitizerComponent ci, short state)
  3500. ;
  3501.     IF ¬ GENERATINGCFM THEN
  3502.         Macro
  3503.         _VDSetPlayThruOnOff
  3504.             dc.w     $2F3C
  3505.             dc.w     $0002
  3506.             dc.w     $002E
  3507.             moveq    #0,d0
  3508.             dc.w     $A82A
  3509.         EndM
  3510.     ELSE
  3511.         IMPORT_CFM_FUNCTION    VDSetPlayThruOnOff
  3512.     ENDIF
  3513.  
  3514. ;
  3515. ; pascal VideoDigitizerError VDSetFieldPreference(VideoDigitizerComponent ci, short fieldFlag)
  3516. ;
  3517.     IF ¬ GENERATINGCFM THEN
  3518.         Macro
  3519.         _VDSetFieldPreference
  3520.             dc.w     $2F3C
  3521.             dc.w     $0002
  3522.             dc.w     $002F
  3523.             moveq    #0,d0
  3524.             dc.w     $A82A
  3525.         EndM
  3526.     ELSE
  3527.         IMPORT_CFM_FUNCTION    VDSetFieldPreference
  3528.     ENDIF
  3529.  
  3530. ;
  3531. ; pascal VideoDigitizerError VDGetFieldPreference(VideoDigitizerComponent ci, short *fieldFlag)
  3532. ;
  3533.     IF ¬ GENERATINGCFM THEN
  3534.         Macro
  3535.         _VDGetFieldPreference
  3536.             dc.w     $2F3C
  3537.             dc.w     $0004
  3538.             dc.w     $0030
  3539.             moveq    #0,d0
  3540.             dc.w     $A82A
  3541.         EndM
  3542.     ELSE
  3543.         IMPORT_CFM_FUNCTION    VDGetFieldPreference
  3544.     ENDIF
  3545.  
  3546. ;
  3547. ; pascal VideoDigitizerError VDPreflightDestination(VideoDigitizerComponent ci, Rect *digitizerRect, PixMap **dest, Rect *destRect, MatrixRecord *m)
  3548. ;
  3549.     IF ¬ GENERATINGCFM THEN
  3550.         Macro
  3551.         _VDPreflightDestination
  3552.             dc.w     $2F3C
  3553.             dc.w     $0010
  3554.             dc.w     $0032
  3555.             moveq    #0,d0
  3556.             dc.w     $A82A
  3557.         EndM
  3558.     ELSE
  3559.         IMPORT_CFM_FUNCTION    VDPreflightDestination
  3560.     ENDIF
  3561.  
  3562. ;
  3563. ; pascal VideoDigitizerError VDPreflightGlobalRect(VideoDigitizerComponent ci, GrafPtr theWindow, Rect *globalRect)
  3564. ;
  3565.     IF ¬ GENERATINGCFM THEN
  3566.         Macro
  3567.         _VDPreflightGlobalRect
  3568.             dc.w     $2F3C
  3569.             dc.w     $0008
  3570.             dc.w     $0033
  3571.             moveq    #0,d0
  3572.             dc.w     $A82A
  3573.         EndM
  3574.     ELSE
  3575.         IMPORT_CFM_FUNCTION    VDPreflightGlobalRect
  3576.     ENDIF
  3577.  
  3578. ;
  3579. ; pascal VideoDigitizerError VDSetPlayThruGlobalRect(VideoDigitizerComponent ci, GrafPtr theWindow, Rect *globalRect)
  3580. ;
  3581.     IF ¬ GENERATINGCFM THEN
  3582.         Macro
  3583.         _VDSetPlayThruGlobalRect
  3584.             dc.w     $2F3C
  3585.             dc.w     $0008
  3586.             dc.w     $0034
  3587.             moveq    #0,d0
  3588.             dc.w     $A82A
  3589.         EndM
  3590.     ELSE
  3591.         IMPORT_CFM_FUNCTION    VDSetPlayThruGlobalRect
  3592.     ENDIF
  3593.  
  3594. ;
  3595. ; pascal VideoDigitizerError VDSetInputGammaRecord(VideoDigitizerComponent ci, VDGamRecPtr inputGammaPtr)
  3596. ;
  3597.     IF ¬ GENERATINGCFM THEN
  3598.         Macro
  3599.         _VDSetInputGammaRecord
  3600.             dc.w     $2F3C
  3601.             dc.w     $0004
  3602.             dc.w     $0035
  3603.             moveq    #0,d0
  3604.             dc.w     $A82A
  3605.         EndM
  3606.     ELSE
  3607.         IMPORT_CFM_FUNCTION    VDSetInputGammaRecord
  3608.     ENDIF
  3609.  
  3610. ;
  3611. ; pascal VideoDigitizerError VDGetInputGammaRecord(VideoDigitizerComponent ci, VDGamRecPtr *inputGammaPtr)
  3612. ;
  3613.     IF ¬ GENERATINGCFM THEN
  3614.         Macro
  3615.         _VDGetInputGammaRecord
  3616.             dc.w     $2F3C
  3617.             dc.w     $0004
  3618.             dc.w     $0036
  3619.             moveq    #0,d0
  3620.             dc.w     $A82A
  3621.         EndM
  3622.     ELSE
  3623.         IMPORT_CFM_FUNCTION    VDGetInputGammaRecord
  3624.     ENDIF
  3625.  
  3626. ;
  3627. ; pascal VideoDigitizerError VDSetBlackLevelValue(VideoDigitizerComponent ci, unsigned short *blackLevel)
  3628. ;
  3629.     IF ¬ GENERATINGCFM THEN
  3630.         Macro
  3631.         _VDSetBlackLevelValue
  3632.             dc.w     $2F3C
  3633.             dc.w     $0004
  3634.             dc.w     $0037
  3635.             moveq    #0,d0
  3636.             dc.w     $A82A
  3637.         EndM
  3638.     ELSE
  3639.         IMPORT_CFM_FUNCTION    VDSetBlackLevelValue
  3640.     ENDIF
  3641.  
  3642. ;
  3643. ; pascal VideoDigitizerError VDGetBlackLevelValue(VideoDigitizerComponent ci, unsigned short *blackLevel)
  3644. ;
  3645.     IF ¬ GENERATINGCFM THEN
  3646.         Macro
  3647.         _VDGetBlackLevelValue
  3648.             dc.w     $2F3C
  3649.             dc.w     $0004
  3650.             dc.w     $0038
  3651.             moveq    #0,d0
  3652.             dc.w     $A82A
  3653.         EndM
  3654.     ELSE
  3655.         IMPORT_CFM_FUNCTION    VDGetBlackLevelValue
  3656.     ENDIF
  3657.  
  3658. ;
  3659. ; pascal VideoDigitizerError VDSetWhiteLevelValue(VideoDigitizerComponent ci, unsigned short *whiteLevel)
  3660. ;
  3661.     IF ¬ GENERATINGCFM THEN
  3662.         Macro
  3663.         _VDSetWhiteLevelValue
  3664.             dc.w     $2F3C
  3665.             dc.w     $0004
  3666.             dc.w     $0039
  3667.             moveq    #0,d0
  3668.             dc.w     $A82A
  3669.         EndM
  3670.     ELSE
  3671.         IMPORT_CFM_FUNCTION    VDSetWhiteLevelValue
  3672.     ENDIF
  3673.  
  3674. ;
  3675. ; pascal VideoDigitizerError VDGetWhiteLevelValue(VideoDigitizerComponent ci, unsigned short *whiteLevel)
  3676. ;
  3677.     IF ¬ GENERATINGCFM THEN
  3678.         Macro
  3679.         _VDGetWhiteLevelValue
  3680.             dc.w     $2F3C
  3681.             dc.w     $0004
  3682.             dc.w     $003A
  3683.             moveq    #0,d0
  3684.             dc.w     $A82A
  3685.         EndM
  3686.     ELSE
  3687.         IMPORT_CFM_FUNCTION    VDGetWhiteLevelValue
  3688.     ENDIF
  3689.  
  3690. ;
  3691. ; pascal VideoDigitizerError VDGetVideoDefaults(VideoDigitizerComponent ci, unsigned short *blackLevel, unsigned short *whiteLevel, unsigned short *brightness, unsigned short *hue, unsigned short *saturation, unsigned short *contrast, unsigned short *sharpness)
  3692. ;
  3693.     IF ¬ GENERATINGCFM THEN
  3694.         Macro
  3695.         _VDGetVideoDefaults
  3696.             dc.w     $2F3C
  3697.             dc.w     $001C
  3698.             dc.w     $003B
  3699.             moveq    #0,d0
  3700.             dc.w     $A82A
  3701.         EndM
  3702.     ELSE
  3703.         IMPORT_CFM_FUNCTION    VDGetVideoDefaults
  3704.     ENDIF
  3705.  
  3706. ;
  3707. ; pascal VideoDigitizerError VDGetNumberOfInputs(VideoDigitizerComponent ci, short *inputs)
  3708. ;
  3709.     IF ¬ GENERATINGCFM THEN
  3710.         Macro
  3711.         _VDGetNumberOfInputs
  3712.             dc.w     $2F3C
  3713.             dc.w     $0004
  3714.             dc.w     $003C
  3715.             moveq    #0,d0
  3716.             dc.w     $A82A
  3717.         EndM
  3718.     ELSE
  3719.         IMPORT_CFM_FUNCTION    VDGetNumberOfInputs
  3720.     ENDIF
  3721.  
  3722. ;
  3723. ; pascal VideoDigitizerError VDGetInputFormat(VideoDigitizerComponent ci, short input, short *format)
  3724. ;
  3725.     IF ¬ GENERATINGCFM THEN
  3726.         Macro
  3727.         _VDGetInputFormat
  3728.             dc.w     $2F3C
  3729.             dc.w     $0006
  3730.             dc.w     $003D
  3731.             moveq    #0,d0
  3732.             dc.w     $A82A
  3733.         EndM
  3734.     ELSE
  3735.         IMPORT_CFM_FUNCTION    VDGetInputFormat
  3736.     ENDIF
  3737.  
  3738. ;
  3739. ; pascal VideoDigitizerError VDSetInput(VideoDigitizerComponent ci, short input)
  3740. ;
  3741.     IF ¬ GENERATINGCFM THEN
  3742.         Macro
  3743.         _VDSetInput
  3744.             dc.w     $2F3C
  3745.             dc.w     $0002
  3746.             dc.w     $003E
  3747.             moveq    #0,d0
  3748.             dc.w     $A82A
  3749.         EndM
  3750.     ELSE
  3751.         IMPORT_CFM_FUNCTION    VDSetInput
  3752.     ENDIF
  3753.  
  3754. ;
  3755. ; pascal VideoDigitizerError VDGetInput(VideoDigitizerComponent ci, short *input)
  3756. ;
  3757.     IF ¬ GENERATINGCFM THEN
  3758.         Macro
  3759.         _VDGetInput
  3760.             dc.w     $2F3C
  3761.             dc.w     $0004
  3762.             dc.w     $003F
  3763.             moveq    #0,d0
  3764.             dc.w     $A82A
  3765.         EndM
  3766.     ELSE
  3767.         IMPORT_CFM_FUNCTION    VDGetInput
  3768.     ENDIF
  3769.  
  3770. ;
  3771. ; pascal VideoDigitizerError VDSetInputStandard(VideoDigitizerComponent ci, short inputStandard)
  3772. ;
  3773.     IF ¬ GENERATINGCFM THEN
  3774.         Macro
  3775.         _VDSetInputStandard
  3776.             dc.w     $2F3C
  3777.             dc.w     $0002
  3778.             dc.w     $0040
  3779.             moveq    #0,d0
  3780.             dc.w     $A82A
  3781.         EndM
  3782.     ELSE
  3783.         IMPORT_CFM_FUNCTION    VDSetInputStandard
  3784.     ENDIF
  3785.  
  3786. ;
  3787. ; pascal VideoDigitizerError VDSetupBuffers(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList)
  3788. ;
  3789.     IF ¬ GENERATINGCFM THEN
  3790.         Macro
  3791.         _VDSetupBuffers
  3792.             dc.w     $2F3C
  3793.             dc.w     $0004
  3794.             dc.w     $0041
  3795.             moveq    #0,d0
  3796.             dc.w     $A82A
  3797.         EndM
  3798.     ELSE
  3799.         IMPORT_CFM_FUNCTION    VDSetupBuffers
  3800.     ENDIF
  3801.  
  3802. ;
  3803. ; pascal VideoDigitizerError VDGrabOneFrameAsync(VideoDigitizerComponent ci, short buffer)
  3804. ;
  3805.     IF ¬ GENERATINGCFM THEN
  3806.         Macro
  3807.         _VDGrabOneFrameAsync
  3808.             dc.w     $2F3C
  3809.             dc.w     $0002
  3810.             dc.w     $0042
  3811.             moveq    #0,d0
  3812.             dc.w     $A82A
  3813.         EndM
  3814.     ELSE
  3815.         IMPORT_CFM_FUNCTION    VDGrabOneFrameAsync
  3816.     ENDIF
  3817.  
  3818. ;
  3819. ; pascal VideoDigitizerError VDDone(VideoDigitizerComponent ci, short buffer)
  3820. ;
  3821.     IF ¬ GENERATINGCFM THEN
  3822.         Macro
  3823.         _VDDone
  3824.             dc.w     $2F3C
  3825.             dc.w     $0002
  3826.             dc.w     $0043
  3827.             moveq    #0,d0
  3828.             dc.w     $A82A
  3829.         EndM
  3830.     ELSE
  3831.         IMPORT_CFM_FUNCTION    VDDone
  3832.     ENDIF
  3833.  
  3834. ;
  3835. ; pascal VideoDigitizerError VDSetCompression(VideoDigitizerComponent ci, OSType compressType, short depth, Rect *bounds, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)
  3836. ;
  3837.     IF ¬ GENERATINGCFM THEN
  3838.         Macro
  3839.         _VDSetCompression
  3840.             dc.w     $2F3C
  3841.             dc.w     $0016
  3842.             dc.w     $0044
  3843.             moveq    #0,d0
  3844.             dc.w     $A82A
  3845.         EndM
  3846.     ELSE
  3847.         IMPORT_CFM_FUNCTION    VDSetCompression
  3848.     ENDIF
  3849.  
  3850. ;
  3851. ; pascal VideoDigitizerError VDCompressOneFrameAsync(VideoDigitizerComponent ci)
  3852. ;
  3853.     IF ¬ GENERATINGCFM THEN
  3854.         Macro
  3855.         _VDCompressOneFrameAsync
  3856.             dc.w     $2F3C
  3857.             dc.w     $0000
  3858.             dc.w     $0045
  3859.             moveq    #0,d0
  3860.             dc.w     $A82A
  3861.         EndM
  3862.     ELSE
  3863.         IMPORT_CFM_FUNCTION    VDCompressOneFrameAsync
  3864.     ENDIF
  3865.  
  3866. ;
  3867. ; pascal VideoDigitizerError VDCompressDone(VideoDigitizerComponent ci, Boolean *done, Ptr *theData, long *dataSize, UInt8 *similarity, TimeRecord *t)
  3868. ;
  3869.     IF ¬ GENERATINGCFM THEN
  3870.         Macro
  3871.         _VDCompressDone
  3872.             dc.w     $2F3C
  3873.             dc.w     $0014
  3874.             dc.w     $0046
  3875.             moveq    #0,d0
  3876.             dc.w     $A82A
  3877.         EndM
  3878.     ELSE
  3879.         IMPORT_CFM_FUNCTION    VDCompressDone
  3880.     ENDIF
  3881.  
  3882. ;
  3883. ; pascal VideoDigitizerError VDReleaseCompressBuffer(VideoDigitizerComponent ci, Ptr bufferAddr)
  3884. ;
  3885.     IF ¬ GENERATINGCFM THEN
  3886.         Macro
  3887.         _VDReleaseCompressBuffer
  3888.             dc.w     $2F3C
  3889.             dc.w     $0004
  3890.             dc.w     $0047
  3891.             moveq    #0,d0
  3892.             dc.w     $A82A
  3893.         EndM
  3894.     ELSE
  3895.         IMPORT_CFM_FUNCTION    VDReleaseCompressBuffer
  3896.     ENDIF
  3897.  
  3898. ;
  3899. ; pascal VideoDigitizerError VDGetImageDescription(VideoDigitizerComponent ci, ImageDescriptionHandle desc)
  3900. ;
  3901.     IF ¬ GENERATINGCFM THEN
  3902.         Macro
  3903.         _VDGetImageDescription
  3904.             dc.w     $2F3C
  3905.             dc.w     $0004
  3906.             dc.w     $0048
  3907.             moveq    #0,d0
  3908.             dc.w     $A82A
  3909.         EndM
  3910.     ELSE
  3911.         IMPORT_CFM_FUNCTION    VDGetImageDescription
  3912.     ENDIF
  3913.  
  3914. ;
  3915. ; pascal VideoDigitizerError VDResetCompressSequence(VideoDigitizerComponent ci)
  3916. ;
  3917.     IF ¬ GENERATINGCFM THEN
  3918.         Macro
  3919.         _VDResetCompressSequence
  3920.             dc.w     $2F3C
  3921.             dc.w     $0000
  3922.             dc.w     $0049
  3923.             moveq    #0,d0
  3924.             dc.w     $A82A
  3925.         EndM
  3926.     ELSE
  3927.         IMPORT_CFM_FUNCTION    VDResetCompressSequence
  3928.     ENDIF
  3929.  
  3930. ;
  3931. ; pascal VideoDigitizerError VDSetCompressionOnOff(VideoDigitizerComponent ci, Boolean state)
  3932. ;
  3933.     IF ¬ GENERATINGCFM THEN
  3934.         Macro
  3935.         _VDSetCompressionOnOff
  3936.             dc.w     $2F3C
  3937.             dc.w     $0002
  3938.             dc.w     $004A
  3939.             moveq    #0,d0
  3940.             dc.w     $A82A
  3941.         EndM
  3942.     ELSE
  3943.         IMPORT_CFM_FUNCTION    VDSetCompressionOnOff
  3944.     ENDIF
  3945.  
  3946. ;
  3947. ; pascal VideoDigitizerError VDGetCompressionTypes(VideoDigitizerComponent ci, VDCompressionListHandle h)
  3948. ;
  3949.     IF ¬ GENERATINGCFM THEN
  3950.         Macro
  3951.         _VDGetCompressionTypes
  3952.             dc.w     $2F3C
  3953.             dc.w     $0004
  3954.             dc.w     $004B
  3955.             moveq    #0,d0
  3956.             dc.w     $A82A
  3957.         EndM
  3958.     ELSE
  3959.         IMPORT_CFM_FUNCTION    VDGetCompressionTypes
  3960.     ENDIF
  3961.  
  3962. ;
  3963. ; pascal VideoDigitizerError VDSetTimeBase(VideoDigitizerComponent ci, TimeBase t)
  3964. ;
  3965.     IF ¬ GENERATINGCFM THEN
  3966.         Macro
  3967.         _VDSetTimeBase
  3968.             dc.w     $2F3C
  3969.             dc.w     $0004
  3970.             dc.w     $004C
  3971.             moveq    #0,d0
  3972.             dc.w     $A82A
  3973.         EndM
  3974.     ELSE
  3975.         IMPORT_CFM_FUNCTION    VDSetTimeBase
  3976.     ENDIF
  3977.  
  3978. ;
  3979. ; pascal VideoDigitizerError VDSetFrameRate(VideoDigitizerComponent ci, Fixed framesPerSecond)
  3980. ;
  3981.     IF ¬ GENERATINGCFM THEN
  3982.         Macro
  3983.         _VDSetFrameRate
  3984.             dc.w     $2F3C
  3985.             dc.w     $0004
  3986.             dc.w     $004D
  3987.             moveq    #0,d0
  3988.             dc.w     $A82A
  3989.         EndM
  3990.     ELSE
  3991.         IMPORT_CFM_FUNCTION    VDSetFrameRate
  3992.     ENDIF
  3993.  
  3994. ;
  3995. ; pascal VideoDigitizerError VDGetDataRate(VideoDigitizerComponent ci, long *milliSecPerFrame, Fixed *framesPerSecond, long *bytesPerSecond)
  3996. ;
  3997.     IF ¬ GENERATINGCFM THEN
  3998.         Macro
  3999.         _VDGetDataRate
  4000.             dc.w     $2F3C
  4001.             dc.w     $000C
  4002.             dc.w     $004E
  4003.             moveq    #0,d0
  4004.             dc.w     $A82A
  4005.         EndM
  4006.     ELSE
  4007.         IMPORT_CFM_FUNCTION    VDGetDataRate
  4008.     ENDIF
  4009.  
  4010. ;
  4011. ; pascal VideoDigitizerError VDGetSoundInputDriver(VideoDigitizerComponent ci, Str255 soundDriverName)
  4012. ;
  4013.     IF ¬ GENERATINGCFM THEN
  4014.         Macro
  4015.         _VDGetSoundInputDriver
  4016.             dc.w     $2F3C
  4017.             dc.w     $0004
  4018.             dc.w     $004F
  4019.             moveq    #0,d0
  4020.             dc.w     $A82A
  4021.         EndM
  4022.     ELSE
  4023.         IMPORT_CFM_FUNCTION    VDGetSoundInputDriver
  4024.     ENDIF
  4025.  
  4026. ;
  4027. ; pascal VideoDigitizerError VDGetDMADepths(VideoDigitizerComponent ci, long *depthArray, long *preferredDepth)
  4028. ;
  4029.     IF ¬ GENERATINGCFM THEN
  4030.         Macro
  4031.         _VDGetDMADepths
  4032.             dc.w     $2F3C
  4033.             dc.w     $0008
  4034.             dc.w     $0050
  4035.             moveq    #0,d0
  4036.             dc.w     $A82A
  4037.         EndM
  4038.     ELSE
  4039.         IMPORT_CFM_FUNCTION    VDGetDMADepths
  4040.     ENDIF
  4041.  
  4042. ;
  4043. ; pascal VideoDigitizerError VDGetPreferredTimeScale(VideoDigitizerComponent ci, TimeScale *preferred)
  4044. ;
  4045.     IF ¬ GENERATINGCFM THEN
  4046.         Macro
  4047.         _VDGetPreferredTimeScale
  4048.             dc.w     $2F3C
  4049.             dc.w     $0004
  4050.             dc.w     $0051
  4051.             moveq    #0,d0
  4052.             dc.w     $A82A
  4053.         EndM
  4054.     ELSE
  4055.         IMPORT_CFM_FUNCTION    VDGetPreferredTimeScale
  4056.     ENDIF
  4057.  
  4058. ;
  4059. ; pascal VideoDigitizerError VDReleaseAsyncBuffers(VideoDigitizerComponent ci)
  4060. ;
  4061.     IF ¬ GENERATINGCFM THEN
  4062.         Macro
  4063.         _VDReleaseAsyncBuffers
  4064.             dc.w     $2F3C
  4065.             dc.w     $0000
  4066.             dc.w     $0052
  4067.             moveq    #0,d0
  4068.             dc.w     $A82A
  4069.         EndM
  4070.     ELSE
  4071.         IMPORT_CFM_FUNCTION    VDReleaseAsyncBuffers
  4072.     ENDIF
  4073.  
  4074. ; 83 is reserved for compatibility reasons 
  4075. ;
  4076. ; pascal VideoDigitizerError VDSetDataRate(VideoDigitizerComponent ci, long bytesPerSecond)
  4077. ;
  4078.     IF ¬ GENERATINGCFM THEN
  4079.         Macro
  4080.         _VDSetDataRate
  4081.             dc.w     $2F3C
  4082.             dc.w     $0004
  4083.             dc.w     $0054
  4084.             moveq    #0,d0
  4085.             dc.w     $A82A
  4086.         EndM
  4087.     ELSE
  4088.         IMPORT_CFM_FUNCTION    VDSetDataRate
  4089.     ENDIF
  4090.  
  4091. ;
  4092. ; pascal VideoDigitizerError VDGetTimeCode(VideoDigitizerComponent ci, TimeRecord *atTime, void *timeCodeFormat, void *timeCodeTime)
  4093. ;
  4094.     IF ¬ GENERATINGCFM THEN
  4095.         Macro
  4096.         _VDGetTimeCode
  4097.             dc.w     $2F3C
  4098.             dc.w     $000C
  4099.             dc.w     $0055
  4100.             moveq    #0,d0
  4101.             dc.w     $A82A
  4102.         EndM
  4103.     ELSE
  4104.         IMPORT_CFM_FUNCTION    VDGetTimeCode
  4105.     ENDIF
  4106.  
  4107. ;
  4108. ; pascal VideoDigitizerError VDUseSafeBuffers(VideoDigitizerComponent ci, Boolean useSafeBuffers)
  4109. ;
  4110.     IF ¬ GENERATINGCFM THEN
  4111.         Macro
  4112.         _VDUseSafeBuffers
  4113.             dc.w     $2F3C
  4114.             dc.w     $0002
  4115.             dc.w     $0056
  4116.             moveq    #0,d0
  4117.             dc.w     $A82A
  4118.         EndM
  4119.     ELSE
  4120.         IMPORT_CFM_FUNCTION    VDUseSafeBuffers
  4121.     ENDIF
  4122.  
  4123. kSelectVDGetMaxSrcRect            EQU        $1
  4124. kSelectVDGetActiveSrcRect        EQU        $2
  4125. kSelectVDSetDigitizerRect        EQU        $3
  4126. kSelectVDGetDigitizerRect        EQU        $4
  4127. kSelectVDGetVBlankRect            EQU        $5
  4128. kSelectVDGetMaskPixMap            EQU        $6
  4129. kSelectVDGetPlayThruDestination    EQU        $8
  4130. kSelectVDUseThisCLUT            EQU        $9
  4131. kSelectVDSetInputGammaValue        EQU        $A
  4132. kSelectVDGetInputGammaValue        EQU        $B
  4133. kSelectVDSetBrightness            EQU        $C
  4134. kSelectVDGetBrightness            EQU        $D
  4135. kSelectVDSetContrast            EQU        $E
  4136. kSelectVDSetHue                    EQU        $F
  4137. kSelectVDSetSharpness            EQU        $10
  4138. kSelectVDSetSaturation            EQU        $11
  4139. kSelectVDGetContrast            EQU        $12
  4140. kSelectVDGetHue                    EQU        $13
  4141. kSelectVDGetSharpness            EQU        $14
  4142. kSelectVDGetSaturation            EQU        $15
  4143. kSelectVDGrabOneFrame            EQU        $16
  4144. kSelectVDGetMaxAuxBuffer        EQU        $17
  4145. kSelectVDGetDigitizerInfo        EQU        $19
  4146. kSelectVDGetCurrentFlags        EQU        $1A
  4147. kSelectVDSetKeyColor            EQU        $1B
  4148. kSelectVDGetKeyColor            EQU        $1C
  4149. kSelectVDAddKeyColor            EQU        $1D
  4150. kSelectVDGetNextKeyColor        EQU        $1E
  4151. kSelectVDSetKeyColorRange        EQU        $1F
  4152. kSelectVDGetKeyColorRange        EQU        $20
  4153. kSelectVDSetDigitizerUserInterrupt EQU        $21
  4154. kSelectVDSetInputColorSpaceMode    EQU        $22
  4155. kSelectVDGetInputColorSpaceMode    EQU        $23
  4156. kSelectVDSetClipState            EQU        $24
  4157. kSelectVDGetClipState            EQU        $25
  4158. kSelectVDSetClipRgn                EQU        $26
  4159. kSelectVDClearClipRgn            EQU        $27
  4160. kSelectVDGetCLUTInUse            EQU        $28
  4161. kSelectVDSetPLLFilterType        EQU        $29
  4162. kSelectVDGetPLLFilterType        EQU        $2A
  4163. kSelectVDGetMaskandValue        EQU        $2B
  4164. kSelectVDSetMasterBlendLevel    EQU        $2C
  4165. kSelectVDSetPlayThruDestination    EQU        $2D
  4166. kSelectVDSetPlayThruOnOff        EQU        $2E
  4167. kSelectVDSetFieldPreference        EQU        $2F
  4168. kSelectVDGetFieldPreference        EQU        $30
  4169. kSelectVDPreflightDestination    EQU        $32
  4170. kSelectVDPreflightGlobalRect    EQU        $33
  4171. kSelectVDSetPlayThruGlobalRect    EQU        $34
  4172. kSelectVDSetInputGammaRecord    EQU        $35
  4173. kSelectVDGetInputGammaRecord    EQU        $36
  4174. kSelectVDSetBlackLevelValue        EQU        $37
  4175. kSelectVDGetBlackLevelValue        EQU        $38
  4176. kSelectVDSetWhiteLevelValue        EQU        $39
  4177. kSelectVDGetWhiteLevelValue        EQU        $3A
  4178. kSelectVDGetVideoDefaults        EQU        $3B
  4179. kSelectVDGetNumberOfInputs        EQU        $3C
  4180. kSelectVDGetInputFormat            EQU        $3D
  4181. kSelectVDSetInput                EQU        $3E
  4182. kSelectVDGetInput                EQU        $3F
  4183. kSelectVDSetInputStandard        EQU        $40
  4184. kSelectVDSetupBuffers            EQU        $41
  4185. kSelectVDGrabOneFrameAsync        EQU        $42
  4186. kSelectVDDone                    EQU        $43
  4187. kSelectVDSetCompression            EQU        $44
  4188. kSelectVDCompressOneFrameAsync    EQU        $45
  4189. kSelectVDCompressDone            EQU        $46
  4190. kSelectVDReleaseCompressBuffer    EQU        $47
  4191. kSelectVDGetImageDescription    EQU        $48
  4192. kSelectVDResetCompressSequence    EQU        $49
  4193. kSelectVDSetCompressionOnOff    EQU        $4A
  4194. kSelectVDGetCompressionTypes    EQU        $4B
  4195. kSelectVDSetTimeBase            EQU        $4C
  4196. kSelectVDSetFrameRate            EQU        $4D
  4197. kSelectVDGetDataRate            EQU        $4E
  4198. kSelectVDGetSoundInputDriver    EQU        $4F
  4199. kSelectVDGetDMADepths            EQU        $50
  4200. kSelectVDGetPreferredTimeScale    EQU        $51
  4201. kSelectVDReleaseAsyncBuffers    EQU        $52
  4202. kSelectVDSetDataRate            EQU        $54
  4203. kSelectVDGetTimeCode            EQU        $55
  4204. kSelectVDUseSafeBuffers            EQU        $56
  4205.  
  4206. StandardCompressionType            EQU        'scdi'
  4207. StandardCompressionSubType        EQU        'imag'
  4208.  
  4209. scListEveryCodec                EQU        1 << 1
  4210. scAllowZeroFrameRate            EQU        1 << 2
  4211. scAllowZeroKeyFrameRate            EQU        1 << 3
  4212. scShowBestDepth                    EQU        1 << 4
  4213. scUseMovableModal                EQU        1 << 5
  4214.  
  4215. ;    Possible test flags for setting test image.
  4216. scPreferCropping                EQU        1 << 0
  4217. scPreferScaling                    EQU        1 << 1
  4218. scPreferScalingAndCropping        EQU        scPreferScaling | scPreferCropping
  4219.  
  4220. ;    Dimensions of the image preview box.
  4221. scTestImageWidth                EQU        80
  4222. scTestImageHeight                EQU        80
  4223.  
  4224. ;    Possible items returned by hookProc.
  4225. scOKItem                        EQU        1
  4226. scCancelItem                    EQU        2
  4227. scCustomItem                    EQU        3
  4228.  
  4229. ;    Result returned when user cancelled.
  4230. scUserCancelled                    EQU        1
  4231.  
  4232. SCSpatialSettings         RECORD    0
  4233. codecType                 ds.l   1        ; offset: $0 (0)
  4234. codec                     ds.l   1        ; offset: $4 (4)
  4235. depth                     ds.w   1        ; offset: $8 (8)
  4236. spatialQuality             ds.l   1        ; offset: $A (10)
  4237. sizeof                     EQU *            ; size:   $E (14)
  4238.                         ENDR
  4239.  
  4240. ; typedef struct SCSpatialSettings  SCSpatialSettings
  4241. SCTemporalSettings         RECORD    0
  4242. temporalQuality             ds.l   1        ; offset: $0 (0)
  4243. frameRate                 ds.l   1        ; offset: $4 (4)
  4244. keyFrameRate             ds.l   1        ; offset: $8 (8)
  4245. sizeof                     EQU *            ; size:   $C (12)
  4246.                         ENDR
  4247.  
  4248. ; typedef struct SCTemporalSettings  SCTemporalSettings
  4249. SCDataRateSettings         RECORD    0
  4250. dataRate                 ds.l   1        ; offset: $0 (0)
  4251. frameDuration             ds.l   1        ; offset: $4 (4)
  4252. minSpatialQuality         ds.l   1        ; offset: $8 (8)
  4253. minTemporalQuality         ds.l   1        ; offset: $C (12)
  4254. sizeof                     EQU *            ; size:   $10 (16)
  4255.                         ENDR
  4256.  
  4257. ; typedef struct SCDataRateSettings  SCDataRateSettings
  4258. SCExtendedProcs         RECORD    0
  4259. filterProc                 ds.l   1        ; offset: $0 (0)
  4260. hookProc                 ds.l   1        ; offset: $4 (4)
  4261. refcon                     ds.l   1        ; offset: $8 (8)
  4262. customName                 ds.l   8        ; offset: $C (12)
  4263. sizeof                     EQU *            ; size:   $2C (44)
  4264.                         ENDR
  4265.  
  4266. ; typedef struct SCExtendedProcs  SCExtendedProcs
  4267. ;    Get/SetInfo selectors
  4268.  
  4269. scSpatialSettingsType            EQU        'sptl'                ; pointer to SCSpatialSettings struct
  4270. scTemporalSettingsType            EQU        'tprl'                ; pointer to SCTemporalSettings struct
  4271. scDataRateSettingsType            EQU        'drat'                ; pointer to SCDataRateSettings struct
  4272. scColorTableType                EQU        'clut'                ; pointer to CTabHandle
  4273. scProgressProcType                EQU        'prog'                ; pointer to ProgressRecord struct
  4274. scExtendedProcsType                EQU        'xprc'                ; pointer to SCExtendedProcs struct
  4275. scPreferenceFlagsType            EQU        'pref'                ; pointer to long
  4276. scSettingsStateType                EQU        'ssta'                ; pointer to Handle
  4277. scSequenceIDType                EQU        'sequ'                ; pointer to ImageSequence
  4278. scWindowPositionType            EQU        'wndw'                ; pointer to Point
  4279. scCodecFlagsType                EQU        'cflg'                ; pointer to CodecFlags
  4280. scCodecSettingsType                EQU        'cdec'                ; pointer to Handle
  4281. scForceKeyValueType                EQU        'ksim'
  4282.  
  4283. ;    scTypeNotFoundErr returned by Get/SetInfo when type cannot be found.
  4284. ;* These are Progress procedures *
  4285. ;
  4286. ; pascal ComponentResult SCPositionRect(ComponentInstance ci, Rect *rp, Point *where)
  4287. ;
  4288.     IF ¬ GENERATINGCFM THEN
  4289.         Macro
  4290.         _SCPositionRect
  4291.             dc.w     $2F3C
  4292.             dc.w     $0008
  4293.             dc.w     $0002
  4294.             moveq    #0,d0
  4295.             dc.w     $A82A
  4296.         EndM
  4297.     ELSE
  4298.         IMPORT_CFM_FUNCTION    SCPositionRect
  4299.     ENDIF
  4300.  
  4301. ;
  4302. ; pascal ComponentResult SCPositionDialog(ComponentInstance ci, short id, Point *where)
  4303. ;
  4304.     IF ¬ GENERATINGCFM THEN
  4305.         Macro
  4306.         _SCPositionDialog
  4307.             dc.w     $2F3C
  4308.             dc.w     $0006
  4309.             dc.w     $0003
  4310.             moveq    #0,d0
  4311.             dc.w     $A82A
  4312.         EndM
  4313.     ELSE
  4314.         IMPORT_CFM_FUNCTION    SCPositionDialog
  4315.     ENDIF
  4316.  
  4317. ;
  4318. ; pascal ComponentResult SCSetTestImagePictHandle(ComponentInstance ci, PicHandle testPict, Rect *testRect, short testFlags)
  4319. ;
  4320.     IF ¬ GENERATINGCFM THEN
  4321.         Macro
  4322.         _SCSetTestImagePictHandle
  4323.             dc.w     $2F3C
  4324.             dc.w     $000A
  4325.             dc.w     $0004
  4326.             moveq    #0,d0
  4327.             dc.w     $A82A
  4328.         EndM
  4329.     ELSE
  4330.         IMPORT_CFM_FUNCTION    SCSetTestImagePictHandle
  4331.     ENDIF
  4332.  
  4333. ;
  4334. ; pascal ComponentResult SCSetTestImagePictFile(ComponentInstance ci, short testFileRef, Rect *testRect, short testFlags)
  4335. ;
  4336.     IF ¬ GENERATINGCFM THEN
  4337.         Macro
  4338.         _SCSetTestImagePictFile
  4339.             dc.w     $2F3C
  4340.             dc.w     $0008
  4341.             dc.w     $0005
  4342.             moveq    #0,d0
  4343.             dc.w     $A82A
  4344.         EndM
  4345.     ELSE
  4346.         IMPORT_CFM_FUNCTION    SCSetTestImagePictFile
  4347.     ENDIF
  4348.  
  4349. ;
  4350. ; pascal ComponentResult SCSetTestImagePixMap(ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags)
  4351. ;
  4352.     IF ¬ GENERATINGCFM THEN
  4353.         Macro
  4354.         _SCSetTestImagePixMap
  4355.             dc.w     $2F3C
  4356.             dc.w     $000A
  4357.             dc.w     $0006
  4358.             moveq    #0,d0
  4359.             dc.w     $A82A
  4360.         EndM
  4361.     ELSE
  4362.         IMPORT_CFM_FUNCTION    SCSetTestImagePixMap
  4363.     ENDIF
  4364.  
  4365. ;
  4366. ; pascal ComponentResult SCGetBestDeviceRect(ComponentInstance ci, Rect *r)
  4367. ;
  4368.     IF ¬ GENERATINGCFM THEN
  4369.         Macro
  4370.         _SCGetBestDeviceRect
  4371.             dc.w     $2F3C
  4372.             dc.w     $0004
  4373.             dc.w     $0007
  4374.             moveq    #0,d0
  4375.             dc.w     $A82A
  4376.         EndM
  4377.     ELSE
  4378.         IMPORT_CFM_FUNCTION    SCGetBestDeviceRect
  4379.     ENDIF
  4380.  
  4381. ;
  4382. ; pascal ComponentResult SCRequestImageSettings(ComponentInstance ci)
  4383. ;
  4384.     IF ¬ GENERATINGCFM THEN
  4385.         Macro
  4386.         _SCRequestImageSettings
  4387.             dc.w     $2F3C
  4388.             dc.w     $0000
  4389.             dc.w     $000A
  4390.             moveq    #0,d0
  4391.             dc.w     $A82A
  4392.         EndM
  4393.     ELSE
  4394.         IMPORT_CFM_FUNCTION    SCRequestImageSettings
  4395.     ENDIF
  4396.  
  4397. ;
  4398. ; pascal ComponentResult SCCompressImage(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle *desc, Handle *data)
  4399. ;
  4400.     IF ¬ GENERATINGCFM THEN
  4401.         Macro
  4402.         _SCCompressImage
  4403.             dc.w     $2F3C
  4404.             dc.w     $0010
  4405.             dc.w     $000B
  4406.             moveq    #0,d0
  4407.             dc.w     $A82A
  4408.         EndM
  4409.     ELSE
  4410.         IMPORT_CFM_FUNCTION    SCCompressImage
  4411.     ENDIF
  4412.  
  4413. ;
  4414. ; pascal ComponentResult SCCompressPicture(ComponentInstance ci, PicHandle srcPicture, PicHandle dstPicture)
  4415. ;
  4416.     IF ¬ GENERATINGCFM THEN
  4417.         Macro
  4418.         _SCCompressPicture
  4419.             dc.w     $2F3C
  4420.             dc.w     $0008
  4421.             dc.w     $000C
  4422.             moveq    #0,d0
  4423.             dc.w     $A82A
  4424.         EndM
  4425.     ELSE
  4426.         IMPORT_CFM_FUNCTION    SCCompressPicture
  4427.     ENDIF
  4428.  
  4429. ;
  4430. ; pascal ComponentResult SCCompressPictureFile(ComponentInstance ci, short srcRefNum, short dstRefNum)
  4431. ;
  4432.     IF ¬ GENERATINGCFM THEN
  4433.         Macro
  4434.         _SCCompressPictureFile
  4435.             dc.w     $2F3C
  4436.             dc.w     $0004
  4437.             dc.w     $000D
  4438.             moveq    #0,d0
  4439.             dc.w     $A82A
  4440.         EndM
  4441.     ELSE
  4442.         IMPORT_CFM_FUNCTION    SCCompressPictureFile
  4443.     ENDIF
  4444.  
  4445. ;
  4446. ; pascal ComponentResult SCRequestSequenceSettings(ComponentInstance ci)
  4447. ;
  4448.     IF ¬ GENERATINGCFM THEN
  4449.         Macro
  4450.         _SCRequestSequenceSettings
  4451.             dc.w     $2F3C
  4452.             dc.w     $0000
  4453.             dc.w     $000E
  4454.             moveq    #0,d0
  4455.             dc.w     $A82A
  4456.         EndM
  4457.     ELSE
  4458.         IMPORT_CFM_FUNCTION    SCRequestSequenceSettings
  4459.     ENDIF
  4460.  
  4461. ;
  4462. ; pascal ComponentResult SCCompressSequenceBegin(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle *desc)
  4463. ;
  4464.     IF ¬ GENERATINGCFM THEN
  4465.         Macro
  4466.         _SCCompressSequenceBegin
  4467.             dc.w     $2F3C
  4468.             dc.w     $000C
  4469.             dc.w     $000F
  4470.             moveq    #0,d0
  4471.             dc.w     $A82A
  4472.         EndM
  4473.     ELSE
  4474.         IMPORT_CFM_FUNCTION    SCCompressSequenceBegin
  4475.     ENDIF
  4476.  
  4477. ;
  4478. ; pascal ComponentResult SCCompressSequenceFrame(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, Handle *data, long *dataSize, short *notSyncFlag)
  4479. ;
  4480.     IF ¬ GENERATINGCFM THEN
  4481.         Macro
  4482.         _SCCompressSequenceFrame
  4483.             dc.w     $2F3C
  4484.             dc.w     $0014
  4485.             dc.w     $0010
  4486.             moveq    #0,d0
  4487.             dc.w     $A82A
  4488.         EndM
  4489.     ELSE
  4490.         IMPORT_CFM_FUNCTION    SCCompressSequenceFrame
  4491.     ENDIF
  4492.  
  4493. ;
  4494. ; pascal ComponentResult SCCompressSequenceEnd(ComponentInstance ci)
  4495. ;
  4496.     IF ¬ GENERATINGCFM THEN
  4497.         Macro
  4498.         _SCCompressSequenceEnd
  4499.             dc.w     $2F3C
  4500.             dc.w     $0000
  4501.             dc.w     $0011
  4502.             moveq    #0,d0
  4503.             dc.w     $A82A
  4504.         EndM
  4505.     ELSE
  4506.         IMPORT_CFM_FUNCTION    SCCompressSequenceEnd
  4507.     ENDIF
  4508.  
  4509. ;
  4510. ; pascal ComponentResult SCDefaultPictHandleSettings(ComponentInstance ci, PicHandle srcPicture, short motion)
  4511. ;
  4512.     IF ¬ GENERATINGCFM THEN
  4513.         Macro
  4514.         _SCDefaultPictHandleSettings
  4515.             dc.w     $2F3C
  4516.             dc.w     $0006
  4517.             dc.w     $0012
  4518.             moveq    #0,d0
  4519.             dc.w     $A82A
  4520.         EndM
  4521.     ELSE
  4522.         IMPORT_CFM_FUNCTION    SCDefaultPictHandleSettings
  4523.     ENDIF
  4524.  
  4525. ;
  4526. ; pascal ComponentResult SCDefaultPictFileSettings(ComponentInstance ci, short srcRef, short motion)
  4527. ;
  4528.     IF ¬ GENERATINGCFM THEN
  4529.         Macro
  4530.         _SCDefaultPictFileSettings
  4531.             dc.w     $2F3C
  4532.             dc.w     $0004
  4533.             dc.w     $0013
  4534.             moveq    #0,d0
  4535.             dc.w     $A82A
  4536.         EndM
  4537.     ELSE
  4538.         IMPORT_CFM_FUNCTION    SCDefaultPictFileSettings
  4539.     ENDIF
  4540.  
  4541. ;
  4542. ; pascal ComponentResult SCDefaultPixMapSettings(ComponentInstance ci, PixMapHandle src, short motion)
  4543. ;
  4544.     IF ¬ GENERATINGCFM THEN
  4545.         Macro
  4546.         _SCDefaultPixMapSettings
  4547.             dc.w     $2F3C
  4548.             dc.w     $0006
  4549.             dc.w     $0014
  4550.             moveq    #0,d0
  4551.             dc.w     $A82A
  4552.         EndM
  4553.     ELSE
  4554.         IMPORT_CFM_FUNCTION    SCDefaultPixMapSettings
  4555.     ENDIF
  4556.  
  4557. ;
  4558. ; pascal ComponentResult SCGetInfo(ComponentInstance ci, OSType infoType, void *info)
  4559. ;
  4560.     IF ¬ GENERATINGCFM THEN
  4561.         Macro
  4562.         _SCGetInfo
  4563.             dc.w     $2F3C
  4564.             dc.w     $0008
  4565.             dc.w     $0015
  4566.             moveq    #0,d0
  4567.             dc.w     $A82A
  4568.         EndM
  4569.     ELSE
  4570.         IMPORT_CFM_FUNCTION    SCGetInfo
  4571.     ENDIF
  4572.  
  4573. ;
  4574. ; pascal ComponentResult SCSetInfo(ComponentInstance ci, OSType infoType, void *info)
  4575. ;
  4576.     IF ¬ GENERATINGCFM THEN
  4577.         Macro
  4578.         _SCSetInfo
  4579.             dc.w     $2F3C
  4580.             dc.w     $0008
  4581.             dc.w     $0016
  4582.             moveq    #0,d0
  4583.             dc.w     $A82A
  4584.         EndM
  4585.     ELSE
  4586.         IMPORT_CFM_FUNCTION    SCSetInfo
  4587.     ENDIF
  4588.  
  4589. ;
  4590. ; pascal ComponentResult SCNewGWorld(ComponentInstance ci, GWorldPtr *gwp, Rect *rp, GWorldFlags flags)
  4591. ;
  4592.     IF ¬ GENERATINGCFM THEN
  4593.         Macro
  4594.         _SCNewGWorld
  4595.             dc.w     $2F3C
  4596.             dc.w     $000C
  4597.             dc.w     $0017
  4598.             moveq    #0,d0
  4599.             dc.w     $A82A
  4600.         EndM
  4601.     ELSE
  4602.         IMPORT_CFM_FUNCTION    SCNewGWorld
  4603.     ENDIF
  4604.  
  4605. ;
  4606. ; pascal ComponentResult SCSetCompressFlags(ComponentInstance ci, long flags)
  4607. ;
  4608.     IF ¬ GENERATINGCFM THEN
  4609.         Macro
  4610.         _SCSetCompressFlags
  4611.             dc.w     $2F3C
  4612.             dc.w     $0004
  4613.             dc.w     $0018
  4614.             moveq    #0,d0
  4615.             dc.w     $A82A
  4616.         EndM
  4617.     ELSE
  4618.         IMPORT_CFM_FUNCTION    SCSetCompressFlags
  4619.     ENDIF
  4620.  
  4621. ;
  4622. ; pascal ComponentResult SCGetCompressFlags(ComponentInstance ci, long *flags)
  4623. ;
  4624.     IF ¬ GENERATINGCFM THEN
  4625.         Macro
  4626.         _SCGetCompressFlags
  4627.             dc.w     $2F3C
  4628.             dc.w     $0004
  4629.             dc.w     $0019
  4630.             moveq    #0,d0
  4631.             dc.w     $A82A
  4632.         EndM
  4633.     ELSE
  4634.         IMPORT_CFM_FUNCTION    SCGetCompressFlags
  4635.     ENDIF
  4636.  
  4637. SCParams                 RECORD    0
  4638. flags                     ds.l   1        ; offset: $0 (0)
  4639. theCodecType             ds.l   1        ; offset: $4 (4)
  4640. theCodec                 ds.l   1        ; offset: $8 (8)
  4641. spatialQuality             ds.l   1        ; offset: $C (12)
  4642. temporalQuality             ds.l   1        ; offset: $10 (16)
  4643. depth                     ds.w   1        ; offset: $14 (20)
  4644. frameRate                 ds.l   1        ; offset: $16 (22)
  4645. keyFrameRate             ds.l   1        ; offset: $1A (26)
  4646. reserved1                 ds.l   1        ; offset: $1E (30)
  4647. reserved2                 ds.l   1        ; offset: $22 (34)
  4648. sizeof                     EQU *            ; size:   $26 (38)
  4649.                         ENDR
  4650.  
  4651. ; typedef struct SCParams     SCParams
  4652.  
  4653. scGetCompression                EQU        1
  4654. scShowMotionSettings            EQU        1 << 0
  4655. scSettingsChangedItem            EQU        -1
  4656.  
  4657. scCompressFlagIgnoreIdenticalFrames EQU        1
  4658.  
  4659. ;
  4660. ; pascal ComponentResult SCGetCompressionExtended(ComponentInstance ci, SCParams *params, Point where, SCModalFilterUPP filterProc, SCModalHookUPP hookProc, long refcon, StringPtr customName)
  4661. ;
  4662.     IF ¬ GENERATINGCFM THEN
  4663.         Macro
  4664.         _SCGetCompressionExtended
  4665.             dc.w     $2F3C
  4666.             dc.w     $0018
  4667.             dc.w     $0001
  4668.             moveq    #0,d0
  4669.             dc.w     $A82A
  4670.         EndM
  4671.     ELSE
  4672.         IMPORT_CFM_FUNCTION    SCGetCompressionExtended
  4673.     ENDIF
  4674.  
  4675. kSCPositionRectSelect            EQU        $2
  4676. kSCPositionDialogSelect            EQU        $3
  4677. kSCSetTestImagePictHandleSelect    EQU        $4
  4678. kSCSetTestImagePictFileSelect    EQU        $5
  4679. kSCSetTestImagePixMapSelect        EQU        $6
  4680. kSCGetBestDeviceRectSelect        EQU        $7
  4681. kSCRequestImageSettingsSelect    EQU        $A
  4682. kSCCompressImageSelect            EQU        $B
  4683. kSCCompressPictureSelect        EQU        $C
  4684. kSCCompressPictureFileSelect    EQU        $D
  4685. kSCRequestSequenceSettingsSelect EQU        $E
  4686. kSCCompressSequenceBeginSelect    EQU        $F
  4687. kSCCompressSequenceFrameSelect    EQU        $10
  4688. kSCCompressSequenceEndSelect    EQU        $11
  4689. kSCDefaultPictHandleSettingsSelect EQU        $12
  4690. kSCDefaultPictFileSettingsSelect EQU        $13
  4691. kSCDefaultPixMapSettingsSelect    EQU        $14
  4692. kSCGetInfoSelect                EQU        $15
  4693. kSCSetInfoSelect                EQU        $16
  4694. kSCNewGWorldSelect                EQU        $17
  4695. kSCSetCompressFlagsSelect        EQU        $18
  4696. kSCGetCompressFlagsSelect        EQU        $19
  4697. kSCGetCompressionExtendedSelect    EQU        $1
  4698.  
  4699. ; typedef ComponentInstance  MovieImportComponent, MovieExportComponent
  4700.  
  4701. MovieImportType                    EQU        'eat '
  4702. MovieExportType                    EQU        'spit'
  4703.  
  4704. canMovieImportHandles            EQU        1 << 0
  4705. canMovieImportFiles                EQU        1 << 1
  4706. hasMovieImportUserInterface        EQU        1 << 2
  4707. canMovieExportHandles            EQU        1 << 3
  4708. canMovieExportFiles                EQU        1 << 4
  4709. hasMovieExportUserInterface        EQU        1 << 5
  4710. dontAutoFileMovieImport            EQU        1 << 6
  4711. canMovieExportAuxDataHandle        EQU        1 << 7
  4712. canMovieImportValidateHandles    EQU        1 << 8
  4713. canMovieImportValidateFile        EQU        1 << 9
  4714. dontRegisterWithEasyOpen        EQU        1 << 10
  4715. canMovieImportInPlace            EQU        1 << 11
  4716. movieImportSubTypeIsFileExtension EQU        1 << 12
  4717.  
  4718. kMovieImportExportOpenSelect    EQU        kComponentOpenSelect
  4719. kMovieImportExportCloseSelect    EQU        kComponentCloseSelect
  4720. kMovieImportExportCanDoSelect    EQU        kComponentCanDoSelect
  4721. kMovieImportExportVersionSelect    EQU        kComponentVersionSelect
  4722. kMovieImportHandleSelect        EQU        1
  4723. kMovieImportFileSelect            EQU        2
  4724. kMovieImportSetSampleDurationSelect EQU        3
  4725. kMovieImportSetSampleDescriptionSelect EQU        4
  4726. kMovieImportSetMediaFileSelect    EQU        5
  4727. kMovieImportSetDimensionsSelect    EQU        6
  4728. kMovieImportSetChunkSizeSelect    EQU        7
  4729. kMovieImportSetProgressProcSelect EQU        8
  4730. kMovieImportSetAuxiliaryDataSelect EQU        9
  4731. kMovieImportSetFromScrapSelect    EQU        10
  4732. kMovieImportDoUserDialogSelect    EQU        11
  4733. kMovieImportSetDurationSelect    EQU        12
  4734. kMovieImportGetAuxiliaryDataTypeSelect EQU        13
  4735. kMovieImportValidateSelect        EQU        14
  4736. kMovieImportGetFileTypeSelect    EQU        15
  4737. kMovieExportToHandleSelect        EQU        128
  4738. kMovieExportToFileSelect        EQU        129
  4739. kMovieExportDoUserDialogSelectOBSOLETE EQU        130
  4740. kMovieExportGetAuxiliaryDataSelect EQU        131
  4741. kMovieExportSetProgressProcSelect EQU        132
  4742. kMovieExportSetSampleDescriptionSelect EQU        133
  4743. kMovieExportDoUserDialogSelect    EQU        134
  4744. kMovieExportGetCreatorTypeSelect EQU        135
  4745.  
  4746. movieImportCreateTrack            EQU        1
  4747. movieImportInParallel            EQU        2
  4748. movieImportMustUseTrack            EQU        4
  4749.  
  4750. movieImportResultUsedMultipleTracks EQU        8
  4751.  
  4752. ;
  4753. ; pascal ComponentResult MovieImportHandle(MovieImportComponent ci, Handle dataH, Movie theMovie, Track targetTrack, Track *usedTrack, TimeValue atTime, TimeValue *addedDuration, long inFlags, long *outFlags)
  4754. ;
  4755.     IF ¬ GENERATINGCFM THEN
  4756.         Macro
  4757.         _MovieImportHandle
  4758.             dc.w     $2F3C
  4759.             dc.w     $0020
  4760.             dc.w     $0001
  4761.             moveq    #0,d0
  4762.             dc.w     $A82A
  4763.         EndM
  4764.     ELSE
  4765.         IMPORT_CFM_FUNCTION    MovieImportHandle
  4766.     ENDIF
  4767.  
  4768. ;
  4769. ; pascal ComponentResult MovieImportFile(MovieImportComponent ci, const FSSpec *theFile, Movie theMovie, Track targetTrack, Track *usedTrack, TimeValue atTime, TimeValue *addedDuration, long inFlags, long *outFlags)
  4770. ;
  4771.     IF ¬ GENERATINGCFM THEN
  4772.         Macro
  4773.         _MovieImportFile
  4774.             dc.w     $2F3C
  4775.             dc.w     $0020
  4776.             dc.w     $0002
  4777.             moveq    #0,d0
  4778.             dc.w     $A82A
  4779.         EndM
  4780.     ELSE
  4781.         IMPORT_CFM_FUNCTION    MovieImportFile
  4782.     ENDIF
  4783.  
  4784. ;
  4785. ; pascal ComponentResult MovieImportSetSampleDuration(MovieImportComponent ci, TimeValue duration, TimeScale scale)
  4786. ;
  4787.     IF ¬ GENERATINGCFM THEN
  4788.         Macro
  4789.         _MovieImportSetSampleDuration
  4790.             dc.w     $2F3C
  4791.             dc.w     $0008
  4792.             dc.w     $0003
  4793.             moveq    #0,d0
  4794.             dc.w     $A82A
  4795.         EndM
  4796.     ELSE
  4797.         IMPORT_CFM_FUNCTION    MovieImportSetSampleDuration
  4798.     ENDIF
  4799.  
  4800. ;
  4801. ; pascal ComponentResult MovieImportSetSampleDescription(MovieImportComponent ci, SampleDescriptionHandle desc, OSType mediaType)
  4802. ;
  4803.     IF ¬ GENERATINGCFM THEN
  4804.         Macro
  4805.         _MovieImportSetSampleDescription
  4806.             dc.w     $2F3C
  4807.             dc.w     $0008
  4808.             dc.w     $0004
  4809.             moveq    #0,d0
  4810.             dc.w     $A82A
  4811.         EndM
  4812.     ELSE
  4813.         IMPORT_CFM_FUNCTION    MovieImportSetSampleDescription
  4814.     ENDIF
  4815.  
  4816. ;
  4817. ; pascal ComponentResult MovieImportSetMediaFile(MovieImportComponent ci, AliasHandle alias)
  4818. ;
  4819.     IF ¬ GENERATINGCFM THEN
  4820.         Macro
  4821.         _MovieImportSetMediaFile
  4822.             dc.w     $2F3C
  4823.             dc.w     $0004
  4824.             dc.w     $0005
  4825.             moveq    #0,d0
  4826.             dc.w     $A82A
  4827.         EndM
  4828.     ELSE
  4829.         IMPORT_CFM_FUNCTION    MovieImportSetMediaFile
  4830.     ENDIF
  4831.  
  4832. ;
  4833. ; pascal ComponentResult MovieImportSetDimensions(MovieImportComponent ci, Fixed width, Fixed height)
  4834. ;
  4835.     IF ¬ GENERATINGCFM THEN
  4836.         Macro
  4837.         _MovieImportSetDimensions
  4838.             dc.w     $2F3C
  4839.             dc.w     $0008
  4840.             dc.w     $0006
  4841.             moveq    #0,d0
  4842.             dc.w     $A82A
  4843.         EndM
  4844.     ELSE
  4845.         IMPORT_CFM_FUNCTION    MovieImportSetDimensions
  4846.     ENDIF
  4847.  
  4848. ;
  4849. ; pascal ComponentResult MovieImportSetChunkSize(MovieImportComponent ci, long chunkSize)
  4850. ;
  4851.     IF ¬ GENERATINGCFM THEN
  4852.         Macro
  4853.         _MovieImportSetChunkSize
  4854.             dc.w     $2F3C
  4855.             dc.w     $0004
  4856.             dc.w     $0007
  4857.             moveq    #0,d0
  4858.             dc.w     $A82A
  4859.         EndM
  4860.     ELSE
  4861.         IMPORT_CFM_FUNCTION    MovieImportSetChunkSize
  4862.     ENDIF
  4863.  
  4864. ;
  4865. ; pascal ComponentResult MovieImportSetProgressProc(MovieImportComponent ci, MovieProgressUPP proc, long refcon)
  4866. ;
  4867.     IF ¬ GENERATINGCFM THEN
  4868.         Macro
  4869.         _MovieImportSetProgressProc
  4870.             dc.w     $2F3C
  4871.             dc.w     $0008
  4872.             dc.w     $0008
  4873.             moveq    #0,d0
  4874.             dc.w     $A82A
  4875.         EndM
  4876.     ELSE
  4877.         IMPORT_CFM_FUNCTION    MovieImportSetProgressProc
  4878.     ENDIF
  4879.  
  4880. ;
  4881. ; pascal ComponentResult MovieImportSetAuxiliaryData(MovieImportComponent ci, Handle data, OSType handleType)
  4882. ;
  4883.     IF ¬ GENERATINGCFM THEN
  4884.         Macro
  4885.         _MovieImportSetAuxiliaryData
  4886.             dc.w     $2F3C
  4887.             dc.w     $0008
  4888.             dc.w     $0009
  4889.             moveq    #0,d0
  4890.             dc.w     $A82A
  4891.         EndM
  4892.     ELSE
  4893.         IMPORT_CFM_FUNCTION    MovieImportSetAuxiliaryData
  4894.     ENDIF
  4895.  
  4896. ;
  4897. ; pascal ComponentResult MovieImportSetFromScrap(MovieImportComponent ci, Boolean fromScrap)
  4898. ;
  4899.     IF ¬ GENERATINGCFM THEN
  4900.         Macro
  4901.         _MovieImportSetFromScrap
  4902.             dc.w     $2F3C
  4903.             dc.w     $0002
  4904.             dc.w     $000A
  4905.             moveq    #0,d0
  4906.             dc.w     $A82A
  4907.         EndM
  4908.     ELSE
  4909.         IMPORT_CFM_FUNCTION    MovieImportSetFromScrap
  4910.     ENDIF
  4911.  
  4912. ;
  4913. ; pascal ComponentResult MovieImportDoUserDialog(MovieImportComponent ci, const FSSpec *theFile, Handle theData, Boolean *canceled)
  4914. ;
  4915.     IF ¬ GENERATINGCFM THEN
  4916.         Macro
  4917.         _MovieImportDoUserDialog
  4918.             dc.w     $2F3C
  4919.             dc.w     $000C
  4920.             dc.w     $000B
  4921.             moveq    #0,d0
  4922.             dc.w     $A82A
  4923.         EndM
  4924.     ELSE
  4925.         IMPORT_CFM_FUNCTION    MovieImportDoUserDialog
  4926.     ENDIF
  4927.  
  4928. ;
  4929. ; pascal ComponentResult MovieImportSetDuration(MovieImportComponent ci, TimeValue duration)
  4930. ;
  4931.     IF ¬ GENERATINGCFM THEN
  4932.         Macro
  4933.         _MovieImportSetDuration
  4934.             dc.w     $2F3C
  4935.             dc.w     $0004
  4936.             dc.w     $000C
  4937.             moveq    #0,d0
  4938.             dc.w     $A82A
  4939.         EndM
  4940.     ELSE
  4941.         IMPORT_CFM_FUNCTION    MovieImportSetDuration
  4942.     ENDIF
  4943.  
  4944. ;
  4945. ; pascal ComponentResult MovieImportGetAuxiliaryDataType(MovieImportComponent ci, OSType *auxType)
  4946. ;
  4947.     IF ¬ GENERATINGCFM THEN
  4948.         Macro
  4949.         _MovieImportGetAuxiliaryDataType
  4950.             dc.w     $2F3C
  4951.             dc.w     $0004
  4952.             dc.w     $000D
  4953.             moveq    #0,d0
  4954.             dc.w     $A82A
  4955.         EndM
  4956.     ELSE
  4957.         IMPORT_CFM_FUNCTION    MovieImportGetAuxiliaryDataType
  4958.     ENDIF
  4959.  
  4960. ;
  4961. ; pascal ComponentResult MovieImportValidate(MovieImportComponent ci, const FSSpec *theFile, Handle theData, Boolean *valid)
  4962. ;
  4963.     IF ¬ GENERATINGCFM THEN
  4964.         Macro
  4965.         _MovieImportValidate
  4966.             dc.w     $2F3C
  4967.             dc.w     $000C
  4968.             dc.w     $000E
  4969.             moveq    #0,d0
  4970.             dc.w     $A82A
  4971.         EndM
  4972.     ELSE
  4973.         IMPORT_CFM_FUNCTION    MovieImportValidate
  4974.     ENDIF
  4975.  
  4976. ;
  4977. ; pascal ComponentResult MovieImportGetFileType(MovieImportComponent ci, OSType *fileType)
  4978. ;
  4979.     IF ¬ GENERATINGCFM THEN
  4980.         Macro
  4981.         _MovieImportGetFileType
  4982.             dc.w     $2F3C
  4983.             dc.w     $0004
  4984.             dc.w     $000F
  4985.             moveq    #0,d0
  4986.             dc.w     $A82A
  4987.         EndM
  4988.     ELSE
  4989.         IMPORT_CFM_FUNCTION    MovieImportGetFileType
  4990.     ENDIF
  4991.  
  4992. ;
  4993. ; pascal ComponentResult MovieExportToHandle(MovieExportComponent ci, Handle dataH, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
  4994. ;
  4995.     IF ¬ GENERATINGCFM THEN
  4996.         Macro
  4997.         _MovieExportToHandle
  4998.             dc.w     $2F3C
  4999.             dc.w     $0014
  5000.             dc.w     $0080
  5001.             moveq    #0,d0
  5002.             dc.w     $A82A
  5003.         EndM
  5004.     ELSE
  5005.         IMPORT_CFM_FUNCTION    MovieExportToHandle
  5006.     ENDIF
  5007.  
  5008. ;
  5009. ; pascal ComponentResult MovieExportToFile(MovieExportComponent ci, const FSSpec *theFile, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
  5010. ;
  5011.     IF ¬ GENERATINGCFM THEN
  5012.         Macro
  5013.         _MovieExportToFile
  5014.             dc.w     $2F3C
  5015.             dc.w     $0014
  5016.             dc.w     $0081
  5017.             moveq    #0,d0
  5018.             dc.w     $A82A
  5019.         EndM
  5020.     ELSE
  5021.         IMPORT_CFM_FUNCTION    MovieExportToFile
  5022.     ENDIF
  5023.  
  5024. ;
  5025. ; pascal ComponentResult MovieExportGetAuxiliaryData(MovieExportComponent ci, Handle dataH, OSType *handleType)
  5026. ;
  5027.     IF ¬ GENERATINGCFM THEN
  5028.         Macro
  5029.         _MovieExportGetAuxiliaryData
  5030.             dc.w     $2F3C
  5031.             dc.w     $0008
  5032.             dc.w     $0083
  5033.             moveq    #0,d0
  5034.             dc.w     $A82A
  5035.         EndM
  5036.     ELSE
  5037.         IMPORT_CFM_FUNCTION    MovieExportGetAuxiliaryData
  5038.     ENDIF
  5039.  
  5040. ;
  5041. ; pascal ComponentResult MovieExportSetProgressProc(MovieExportComponent ci, MovieProgressUPP proc, long refcon)
  5042. ;
  5043.     IF ¬ GENERATINGCFM THEN
  5044.         Macro
  5045.         _MovieExportSetProgressProc
  5046.             dc.w     $2F3C
  5047.             dc.w     $0008
  5048.             dc.w     $0084
  5049.             moveq    #0,d0
  5050.             dc.w     $A82A
  5051.         EndM
  5052.     ELSE
  5053.         IMPORT_CFM_FUNCTION    MovieExportSetProgressProc
  5054.     ENDIF
  5055.  
  5056. ;
  5057. ; pascal ComponentResult MovieExportSetSampleDescription(MovieExportComponent ci, SampleDescriptionHandle desc, OSType mediaType)
  5058. ;
  5059.     IF ¬ GENERATINGCFM THEN
  5060.         Macro
  5061.         _MovieExportSetSampleDescription
  5062.             dc.w     $2F3C
  5063.             dc.w     $0008
  5064.             dc.w     $0085
  5065.             moveq    #0,d0
  5066.             dc.w     $A82A
  5067.         EndM
  5068.     ELSE
  5069.         IMPORT_CFM_FUNCTION    MovieExportSetSampleDescription
  5070.     ENDIF
  5071.  
  5072. ;
  5073. ; pascal ComponentResult MovieExportDoUserDialog(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration, Boolean *canceled)
  5074. ;
  5075.     IF ¬ GENERATINGCFM THEN
  5076.         Macro
  5077.         _MovieExportDoUserDialog
  5078.             dc.w     $2F3C
  5079.             dc.w     $0014
  5080.             dc.w     $0086
  5081.             moveq    #0,d0
  5082.             dc.w     $A82A
  5083.         EndM
  5084.     ELSE
  5085.         IMPORT_CFM_FUNCTION    MovieExportDoUserDialog
  5086.     ENDIF
  5087.  
  5088. ;
  5089. ; pascal ComponentResult MovieExportGetCreatorType(MovieExportComponent ci, OSType *creator)
  5090. ;
  5091.     IF ¬ GENERATINGCFM THEN
  5092.         Macro
  5093.         _MovieExportGetCreatorType
  5094.             dc.w     $2F3C
  5095.             dc.w     $0004
  5096.             dc.w     $0087
  5097.             moveq    #0,d0
  5098.             dc.w     $A82A
  5099.         EndM
  5100.     ELSE
  5101.         IMPORT_CFM_FUNCTION    MovieExportGetCreatorType
  5102.     ENDIF
  5103.  
  5104.      IF ¬ GENERATINGPOWERPC THEN 
  5105. ; Text Export Display Info data structure
  5106. TextDisplayData         RECORD    0
  5107. displayFlags             ds.l   1        ; offset: $0 (0)
  5108. textJustification         ds.l   1        ; offset: $4 (4)
  5109. bgColor                     ds     RGBColor ; offset: $8 (8)
  5110. textBox                     ds     Rect    ; offset: $E (14)
  5111. beginHilite                 ds.w   1        ; offset: $16 (22)
  5112. endHilite                 ds.w   1        ; offset: $18 (24)
  5113. hiliteColor                 ds     RGBColor ; offset: $1A (26)
  5114. doHiliteColor             ds.b   1        ; offset: $20 (32)
  5115. filler                     ds.b   1        ; offset: $21 (33)
  5116. scrollDelayDur             ds.l   1        ; offset: $22 (34)
  5117. dropShadowOffset         ds     Point    ; offset: $26 (38)
  5118. dropShadowTransparency     ds.w   1        ; offset: $2A (42)
  5119. sizeof                     EQU *            ; size:   $2C (44)
  5120.                         ENDR
  5121.  
  5122. ; typedef struct TextDisplayData  TextDisplayData
  5123.     ENDIF
  5124. ; typedef ComponentInstance  TextExportComponent
  5125. ;
  5126. ; pascal ComponentResult TextExportGetDisplayData(TextExportComponent ci, TextDisplayData *textDisplay)
  5127. ;
  5128.     IF ¬ GENERATINGCFM THEN
  5129.         Macro
  5130.         _TextExportGetDisplayData
  5131.             dc.w     $2F3C
  5132.             dc.w     $0004
  5133.             dc.w     $0100
  5134.             moveq    #0,d0
  5135.             dc.w     $A82A
  5136.         EndM
  5137.     ELSE
  5138.         IMPORT_CFM_FUNCTION    TextExportGetDisplayData
  5139.     ENDIF
  5140.  
  5141. ;**************
  5142. ;
  5143. ;    File Preview Components
  5144. ;
  5145. ;**************
  5146. ; typedef ComponentInstance  pnotComponent
  5147.  
  5148. pnotComponentWantsEvents        EQU        1
  5149. pnotComponentNeedsNoCache        EQU        2
  5150.  
  5151. kPreviewOpenSelector            EQU        0
  5152. kPreviewCloseSelector            EQU        -1
  5153. kPreviewCanDoSelector            EQU        -2
  5154. kPreviewVersionSelector            EQU        -3
  5155. kPreviewShowDataSelector        EQU        1
  5156. kPreviewMakePreviewSelector        EQU        2
  5157. kPreviewMakePreviewReferenceSelector EQU        3
  5158. kPreviewEventSelector            EQU        4
  5159.  
  5160. ShowFilePreviewComponentType    EQU        'pnot'
  5161. CreateFilePreviewComponentType    EQU        'pmak'
  5162.  
  5163. ;
  5164. ; pascal ComponentResult PreviewShowData(pnotComponent p, OSType dataType, Handle data, const Rect *inHere)
  5165. ;
  5166.     IF ¬ GENERATINGCFM THEN
  5167.         Macro
  5168.         _PreviewShowData
  5169.             dc.w     $2F3C
  5170.             dc.w     $000C
  5171.             dc.w     $0001
  5172.             moveq    #0,d0
  5173.             dc.w     $A82A
  5174.         EndM
  5175.     ELSE
  5176.         IMPORT_CFM_FUNCTION    PreviewShowData
  5177.     ENDIF
  5178.  
  5179. ;
  5180. ; pascal ComponentResult PreviewMakePreview(pnotComponent p, OSType *previewType, Handle *previewResult, const FSSpec *sourceFile, ICMProgressProcRecordPtr progress)
  5181. ;
  5182.     IF ¬ GENERATINGCFM THEN
  5183.         Macro
  5184.         _PreviewMakePreview
  5185.             dc.w     $2F3C
  5186.             dc.w     $0010
  5187.             dc.w     $0002
  5188.             moveq    #0,d0
  5189.             dc.w     $A82A
  5190.         EndM
  5191.     ELSE
  5192.         IMPORT_CFM_FUNCTION    PreviewMakePreview
  5193.     ENDIF
  5194.  
  5195. ;
  5196. ; pascal ComponentResult PreviewMakePreviewReference(pnotComponent p, OSType *previewType, short *resID, const FSSpec *sourceFile)
  5197. ;
  5198.     IF ¬ GENERATINGCFM THEN
  5199.         Macro
  5200.         _PreviewMakePreviewReference
  5201.             dc.w     $2F3C
  5202.             dc.w     $000C
  5203.             dc.w     $0003
  5204.             moveq    #0,d0
  5205.             dc.w     $A82A
  5206.         EndM
  5207.     ELSE
  5208.         IMPORT_CFM_FUNCTION    PreviewMakePreviewReference
  5209.     ENDIF
  5210.  
  5211. ;
  5212. ; pascal ComponentResult PreviewEvent(pnotComponent p, EventRecord *e, Boolean *handledEvent)
  5213. ;
  5214.     IF ¬ GENERATINGCFM THEN
  5215.         Macro
  5216.         _PreviewEvent
  5217.             dc.w     $2F3C
  5218.             dc.w     $0008
  5219.             dc.w     $0004
  5220.             moveq    #0,d0
  5221.             dc.w     $A82A
  5222.         EndM
  5223.     ELSE
  5224.         IMPORT_CFM_FUNCTION    PreviewEvent
  5225.     ENDIF
  5226.  
  5227. kDataHCanRead                    EQU        1 << 0
  5228. kDataHSpecialRead                EQU        1 << 1
  5229. kDataHSpecialReadFile            EQU        1 << 2
  5230. kDataHCanWrite                    EQU        1 << 3
  5231. kDataHSpecialWrite                EQU        1 << 4
  5232. kDataHSpecialWriteFile            EQU        1 << 5
  5233. kDataHCanStreamingWrite            EQU        1 << 6
  5234. kDataHMustCheckDataRef            EQU        1 << 7
  5235.  
  5236. DataHVolumeListRecord     RECORD    0
  5237. vRefNum                     ds.w   1        ; offset: $0 (0)
  5238. flags                     ds.l   1        ; offset: $2 (2)
  5239. sizeof                     EQU *            ; size:   $6 (6)
  5240.                         ENDR
  5241.  
  5242. ; typedef struct DataHVolumeListRecord  DataHVolumeListRecord
  5243. ; typedef DataHVolumeListRecord  *DataHVolumeListPtr
  5244. ; typedef DataHVolumeListPtr  *DataHVolumeList
  5245.  
  5246. kDataHExtendedSchedule            EQU        'xtnd'
  5247.  
  5248. DataHScheduleRecord     RECORD    0
  5249. timeNeededBy             ds     TimeRecord ; offset: $0 (0)
  5250. extendedID                 ds.l   1        ; offset: $10 (16)        ; always is kDataHExtendedSchedule
  5251. extendedVers             ds.l   1        ; offset: $14 (20)        ; always set to 0
  5252. priority                 ds.l   1        ; offset: $18 (24)        ; 100.0 or more means must have. lower numbers…
  5253. sizeof                     EQU *            ; size:   $1C (28)
  5254.                         ENDR
  5255.  
  5256. ; typedef struct DataHScheduleRecord  DataHScheduleRecord
  5257. ; typedef DataHScheduleRecord  *DataHSchedulePtr
  5258. ;
  5259. ; pascal ComponentResult DataHGetData(DataHandler dh, Handle h, long hOffset, long offset, long size)
  5260. ;
  5261.     IF ¬ GENERATINGCFM THEN
  5262.         Macro
  5263.         _DataHGetData
  5264.             dc.w     $2F3C
  5265.             dc.w     $0010
  5266.             dc.w     $0002
  5267.             moveq    #0,d0
  5268.             dc.w     $A82A
  5269.         EndM
  5270.     ELSE
  5271.         IMPORT_CFM_FUNCTION    DataHGetData
  5272.     ENDIF
  5273.  
  5274. ;
  5275. ; pascal ComponentResult DataHPutData(DataHandler dh, Handle h, long hOffset, long *offset, long size)
  5276. ;
  5277.     IF ¬ GENERATINGCFM THEN
  5278.         Macro
  5279.         _DataHPutData
  5280.             dc.w     $2F3C
  5281.             dc.w     $0010
  5282.             dc.w     $0003
  5283.             moveq    #0,d0
  5284.             dc.w     $A82A
  5285.         EndM
  5286.     ELSE
  5287.         IMPORT_CFM_FUNCTION    DataHPutData
  5288.     ENDIF
  5289.  
  5290. ;
  5291. ; pascal ComponentResult DataHFlushData(DataHandler dh)
  5292. ;
  5293.     IF ¬ GENERATINGCFM THEN
  5294.         Macro
  5295.         _DataHFlushData
  5296.             dc.w     $2F3C
  5297.             dc.w     $0000
  5298.             dc.w     $0004
  5299.             moveq    #0,d0
  5300.             dc.w     $A82A
  5301.         EndM
  5302.     ELSE
  5303.         IMPORT_CFM_FUNCTION    DataHFlushData
  5304.     ENDIF
  5305.  
  5306. ;
  5307. ; pascal ComponentResult DataHOpenForWrite(DataHandler dh)
  5308. ;
  5309.     IF ¬ GENERATINGCFM THEN
  5310.         Macro
  5311.         _DataHOpenForWrite
  5312.             dc.w     $2F3C
  5313.             dc.w     $0000
  5314.             dc.w     $0005
  5315.             moveq    #0,d0
  5316.             dc.w     $A82A
  5317.         EndM
  5318.     ELSE
  5319.         IMPORT_CFM_FUNCTION    DataHOpenForWrite
  5320.     ENDIF
  5321.  
  5322. ;
  5323. ; pascal ComponentResult DataHCloseForWrite(DataHandler dh)
  5324. ;
  5325.     IF ¬ GENERATINGCFM THEN
  5326.         Macro
  5327.         _DataHCloseForWrite
  5328.             dc.w     $2F3C
  5329.             dc.w     $0000
  5330.             dc.w     $0006
  5331.             moveq    #0,d0
  5332.             dc.w     $A82A
  5333.         EndM
  5334.     ELSE
  5335.         IMPORT_CFM_FUNCTION    DataHCloseForWrite
  5336.     ENDIF
  5337.  
  5338. ;
  5339. ; pascal ComponentResult DataHOpenForRead(DataHandler dh)
  5340. ;
  5341.     IF ¬ GENERATINGCFM THEN
  5342.         Macro
  5343.         _DataHOpenForRead
  5344.             dc.w     $2F3C
  5345.             dc.w     $0000
  5346.             dc.w     $0008
  5347.             moveq    #0,d0
  5348.             dc.w     $A82A
  5349.         EndM
  5350.     ELSE
  5351.         IMPORT_CFM_FUNCTION    DataHOpenForRead
  5352.     ENDIF
  5353.  
  5354. ;
  5355. ; pascal ComponentResult DataHCloseForRead(DataHandler dh)
  5356. ;
  5357.     IF ¬ GENERATINGCFM THEN
  5358.         Macro
  5359.         _DataHCloseForRead
  5360.             dc.w     $2F3C
  5361.             dc.w     $0000
  5362.             dc.w     $0009
  5363.             moveq    #0,d0
  5364.             dc.w     $A82A
  5365.         EndM
  5366.     ELSE
  5367.         IMPORT_CFM_FUNCTION    DataHCloseForRead
  5368.     ENDIF
  5369.  
  5370. ;
  5371. ; pascal ComponentResult DataHSetDataRef(DataHandler dh, Handle dataRef)
  5372. ;
  5373.     IF ¬ GENERATINGCFM THEN
  5374.         Macro
  5375.         _DataHSetDataRef
  5376.             dc.w     $2F3C
  5377.             dc.w     $0004
  5378.             dc.w     $000A
  5379.             moveq    #0,d0
  5380.             dc.w     $A82A
  5381.         EndM
  5382.     ELSE
  5383.         IMPORT_CFM_FUNCTION    DataHSetDataRef
  5384.     ENDIF
  5385.  
  5386. ;
  5387. ; pascal ComponentResult DataHGetDataRef(DataHandler dh, Handle *dataRef)
  5388. ;
  5389.     IF ¬ GENERATINGCFM THEN
  5390.         Macro
  5391.         _DataHGetDataRef
  5392.             dc.w     $2F3C
  5393.             dc.w     $0004
  5394.             dc.w     $000B
  5395.             moveq    #0,d0
  5396.             dc.w     $A82A
  5397.         EndM
  5398.     ELSE
  5399.         IMPORT_CFM_FUNCTION    DataHGetDataRef
  5400.     ENDIF
  5401.  
  5402. ;
  5403. ; pascal ComponentResult DataHCompareDataRef(DataHandler dh, Handle dataRef, Boolean *equal)
  5404. ;
  5405.     IF ¬ GENERATINGCFM THEN
  5406.         Macro
  5407.         _DataHCompareDataRef
  5408.             dc.w     $2F3C
  5409.             dc.w     $0008
  5410.             dc.w     $000C
  5411.             moveq    #0,d0
  5412.             dc.w     $A82A
  5413.         EndM
  5414.     ELSE
  5415.         IMPORT_CFM_FUNCTION    DataHCompareDataRef
  5416.     ENDIF
  5417.  
  5418. ;
  5419. ; pascal ComponentResult DataHTask(DataHandler dh)
  5420. ;
  5421.     IF ¬ GENERATINGCFM THEN
  5422.         Macro
  5423.         _DataHTask
  5424.             dc.w     $2F3C
  5425.             dc.w     $0000
  5426.             dc.w     $000D
  5427.             moveq    #0,d0
  5428.             dc.w     $A82A
  5429.         EndM
  5430.     ELSE
  5431.         IMPORT_CFM_FUNCTION    DataHTask
  5432.     ENDIF
  5433.  
  5434. ;
  5435. ; pascal ComponentResult DataHScheduleData(DataHandler dh, Ptr PlaceToPutDataPtr, long FileOffset, long DataSize, long RefCon, DataHSchedulePtr scheduleRec, DataHCompletionUPP CompletionRtn)
  5436. ;
  5437.     IF ¬ GENERATINGCFM THEN
  5438.         Macro
  5439.         _DataHScheduleData
  5440.             dc.w     $2F3C
  5441.             dc.w     $0018
  5442.             dc.w     $000E
  5443.             moveq    #0,d0
  5444.             dc.w     $A82A
  5445.         EndM
  5446.     ELSE
  5447.         IMPORT_CFM_FUNCTION    DataHScheduleData
  5448.     ENDIF
  5449.  
  5450. ;
  5451. ; pascal ComponentResult DataHFinishData(DataHandler dh, Ptr PlaceToPutDataPtr, Boolean Cancel)
  5452. ;
  5453.     IF ¬ GENERATINGCFM THEN
  5454.         Macro
  5455.         _DataHFinishData
  5456.             dc.w     $2F3C
  5457.             dc.w     $0006
  5458.             dc.w     $000F
  5459.             moveq    #0,d0
  5460.             dc.w     $A82A
  5461.         EndM
  5462.     ELSE
  5463.         IMPORT_CFM_FUNCTION    DataHFinishData
  5464.     ENDIF
  5465.  
  5466. ;
  5467. ; pascal ComponentResult DataHFlushCache(DataHandler dh)
  5468. ;
  5469.     IF ¬ GENERATINGCFM THEN
  5470.         Macro
  5471.         _DataHFlushCache
  5472.             dc.w     $2F3C
  5473.             dc.w     $0000
  5474.             dc.w     $0010
  5475.             moveq    #0,d0
  5476.             dc.w     $A82A
  5477.         EndM
  5478.     ELSE
  5479.         IMPORT_CFM_FUNCTION    DataHFlushCache
  5480.     ENDIF
  5481.  
  5482. ;
  5483. ; pascal ComponentResult DataHResolveDataRef(DataHandler dh, Handle theDataRef, Boolean *wasChanged, Boolean userInterfaceAllowed)
  5484. ;
  5485.     IF ¬ GENERATINGCFM THEN
  5486.         Macro
  5487.         _DataHResolveDataRef
  5488.             dc.w     $2F3C
  5489.             dc.w     $000A
  5490.             dc.w     $0011
  5491.             moveq    #0,d0
  5492.             dc.w     $A82A
  5493.         EndM
  5494.     ELSE
  5495.         IMPORT_CFM_FUNCTION    DataHResolveDataRef
  5496.     ENDIF
  5497.  
  5498. ;
  5499. ; pascal ComponentResult DataHGetFileSize(DataHandler dh, long *fileSize)
  5500. ;
  5501.     IF ¬ GENERATINGCFM THEN
  5502.         Macro
  5503.         _DataHGetFileSize
  5504.             dc.w     $2F3C
  5505.             dc.w     $0004
  5506.             dc.w     $0012
  5507.             moveq    #0,d0
  5508.             dc.w     $A82A
  5509.         EndM
  5510.     ELSE
  5511.         IMPORT_CFM_FUNCTION    DataHGetFileSize
  5512.     ENDIF
  5513.  
  5514. ;
  5515. ; pascal ComponentResult DataHCanUseDataRef(DataHandler dh, Handle dataRef, long *useFlags)
  5516. ;
  5517.     IF ¬ GENERATINGCFM THEN
  5518.         Macro
  5519.         _DataHCanUseDataRef
  5520.             dc.w     $2F3C
  5521.             dc.w     $0008
  5522.             dc.w     $0013
  5523.             moveq    #0,d0
  5524.             dc.w     $A82A
  5525.         EndM
  5526.     ELSE
  5527.         IMPORT_CFM_FUNCTION    DataHCanUseDataRef
  5528.     ENDIF
  5529.  
  5530. ;
  5531. ; pascal ComponentResult DataHGetVolumeList(DataHandler dh, DataHVolumeList *volumeList)
  5532. ;
  5533.     IF ¬ GENERATINGCFM THEN
  5534.         Macro
  5535.         _DataHGetVolumeList
  5536.             dc.w     $2F3C
  5537.             dc.w     $0004
  5538.             dc.w     $0014
  5539.             moveq    #0,d0
  5540.             dc.w     $A82A
  5541.         EndM
  5542.     ELSE
  5543.         IMPORT_CFM_FUNCTION    DataHGetVolumeList
  5544.     ENDIF
  5545.  
  5546. ;
  5547. ; pascal ComponentResult DataHWrite(DataHandler dh, Ptr data, long offset, long size, DataHCompletionUPP completion, long refCon)
  5548. ;
  5549.     IF ¬ GENERATINGCFM THEN
  5550.         Macro
  5551.         _DataHWrite
  5552.             dc.w     $2F3C
  5553.             dc.w     $0014
  5554.             dc.w     $0015
  5555.             moveq    #0,d0
  5556.             dc.w     $A82A
  5557.         EndM
  5558.     ELSE
  5559.         IMPORT_CFM_FUNCTION    DataHWrite
  5560.     ENDIF
  5561.  
  5562. ;
  5563. ; pascal ComponentResult DataHPreextend(DataHandler dh, long maxToAdd, long *spaceAdded)
  5564. ;
  5565.     IF ¬ GENERATINGCFM THEN
  5566.         Macro
  5567.         _DataHPreextend
  5568.             dc.w     $2F3C
  5569.             dc.w     $0008
  5570.             dc.w     $0016
  5571.             moveq    #0,d0
  5572.             dc.w     $A82A
  5573.         EndM
  5574.     ELSE
  5575.         IMPORT_CFM_FUNCTION    DataHPreextend
  5576.     ENDIF
  5577.  
  5578. ;
  5579. ; pascal ComponentResult DataHSetFileSize(DataHandler dh, long fileSize)
  5580. ;
  5581.     IF ¬ GENERATINGCFM THEN
  5582.         Macro
  5583.         _DataHSetFileSize
  5584.             dc.w     $2F3C
  5585.             dc.w     $0004
  5586.             dc.w     $0017
  5587.             moveq    #0,d0
  5588.             dc.w     $A82A
  5589.         EndM
  5590.     ELSE
  5591.         IMPORT_CFM_FUNCTION    DataHSetFileSize
  5592.     ENDIF
  5593.  
  5594. ;
  5595. ; pascal ComponentResult DataHGetFreeSpace(DataHandler dh, unsigned long *freeSize)
  5596. ;
  5597.     IF ¬ GENERATINGCFM THEN
  5598.         Macro
  5599.         _DataHGetFreeSpace
  5600.             dc.w     $2F3C
  5601.             dc.w     $0004
  5602.             dc.w     $0018
  5603.             moveq    #0,d0
  5604.             dc.w     $A82A
  5605.         EndM
  5606.     ELSE
  5607.         IMPORT_CFM_FUNCTION    DataHGetFreeSpace
  5608.     ENDIF
  5609.  
  5610. ;
  5611. ; pascal ComponentResult DataHCreateFile(DataHandler dh, OSType creator, Boolean deleteExisting)
  5612. ;
  5613.     IF ¬ GENERATINGCFM THEN
  5614.         Macro
  5615.         _DataHCreateFile
  5616.             dc.w     $2F3C
  5617.             dc.w     $0006
  5618.             dc.w     $0019
  5619.             moveq    #0,d0
  5620.             dc.w     $A82A
  5621.         EndM
  5622.     ELSE
  5623.         IMPORT_CFM_FUNCTION    DataHCreateFile
  5624.     ENDIF
  5625.  
  5626. ;
  5627. ; pascal ComponentResult DataHGetPreferredBlockSize(DataHandler dh, long *blockSize)
  5628. ;
  5629.     IF ¬ GENERATINGCFM THEN
  5630.         Macro
  5631.         _DataHGetPreferredBlockSize
  5632.             dc.w     $2F3C
  5633.             dc.w     $0004
  5634.             dc.w     $001A
  5635.             moveq    #0,d0
  5636.             dc.w     $A82A
  5637.         EndM
  5638.     ELSE
  5639.         IMPORT_CFM_FUNCTION    DataHGetPreferredBlockSize
  5640.     ENDIF
  5641.  
  5642. ;
  5643. ; pascal ComponentResult DataHGetDeviceIndex(DataHandler dh, long *deviceIndex)
  5644. ;
  5645.     IF ¬ GENERATINGCFM THEN
  5646.         Macro
  5647.         _DataHGetDeviceIndex
  5648.             dc.w     $2F3C
  5649.             dc.w     $0004
  5650.             dc.w     $001B
  5651.             moveq    #0,d0
  5652.             dc.w     $A82A
  5653.         EndM
  5654.     ELSE
  5655.         IMPORT_CFM_FUNCTION    DataHGetDeviceIndex
  5656.     ENDIF
  5657.  
  5658. ;
  5659. ; pascal ComponentResult DataHIsStreamingDataHandler(DataHandler dh, Boolean *yes)
  5660. ;
  5661.     IF ¬ GENERATINGCFM THEN
  5662.         Macro
  5663.         _DataHIsStreamingDataHandler
  5664.             dc.w     $2F3C
  5665.             dc.w     $0004
  5666.             dc.w     $001C
  5667.             moveq    #0,d0
  5668.             dc.w     $A82A
  5669.         EndM
  5670.     ELSE
  5671.         IMPORT_CFM_FUNCTION    DataHIsStreamingDataHandler
  5672.     ENDIF
  5673.  
  5674. ;
  5675. ; pascal ComponentResult DataHGetDataInBuffer(DataHandler dh, long startOffset, long *size)
  5676. ;
  5677.     IF ¬ GENERATINGCFM THEN
  5678.         Macro
  5679.         _DataHGetDataInBuffer
  5680.             dc.w     $2F3C
  5681.             dc.w     $0008
  5682.             dc.w     $001D
  5683.             moveq    #0,d0
  5684.             dc.w     $A82A
  5685.         EndM
  5686.     ELSE
  5687.         IMPORT_CFM_FUNCTION    DataHGetDataInBuffer
  5688.     ENDIF
  5689.  
  5690. ;
  5691. ; pascal ComponentResult DataHGetScheduleAheadTime(DataHandler dh, long *millisecs)
  5692. ;
  5693.     IF ¬ GENERATINGCFM THEN
  5694.         Macro
  5695.         _DataHGetScheduleAheadTime
  5696.             dc.w     $2F3C
  5697.             dc.w     $0004
  5698.             dc.w     $001E
  5699.             moveq    #0,d0
  5700.             dc.w     $A82A
  5701.         EndM
  5702.     ELSE
  5703.         IMPORT_CFM_FUNCTION    DataHGetScheduleAheadTime
  5704.     ENDIF
  5705.  
  5706. ;
  5707. ; pascal ComponentResult DataHSetCacheSizeLimit(DataHandler dh, Size cacheSizeLimit)
  5708. ;
  5709.     IF ¬ GENERATINGCFM THEN
  5710.         Macro
  5711.         _DataHSetCacheSizeLimit
  5712.             dc.w     $2F3C
  5713.             dc.w     $0004
  5714.             dc.w     $001F
  5715.             moveq    #0,d0
  5716.             dc.w     $A82A
  5717.         EndM
  5718.     ELSE
  5719.         IMPORT_CFM_FUNCTION    DataHSetCacheSizeLimit
  5720.     ENDIF
  5721.  
  5722. ;
  5723. ; pascal ComponentResult DataHGetCacheSizeLimit(DataHandler dh, Size *cacheSizeLimit)
  5724. ;
  5725.     IF ¬ GENERATINGCFM THEN
  5726.         Macro
  5727.         _DataHGetCacheSizeLimit
  5728.             dc.w     $2F3C
  5729.             dc.w     $0004
  5730.             dc.w     $0020
  5731.             moveq    #0,d0
  5732.             dc.w     $A82A
  5733.         EndM
  5734.     ELSE
  5735.         IMPORT_CFM_FUNCTION    DataHGetCacheSizeLimit
  5736.     ENDIF
  5737.  
  5738. ;
  5739. ; pascal ComponentResult DataHPlaybackHints(DataHandler dh, long flags, unsigned long minFileOffset, unsigned long maxFileOffset, long bytesPerSecond)
  5740. ;
  5741.     IF ¬ GENERATINGCFM THEN
  5742.         Macro
  5743.         _DataHPlaybackHints
  5744.             dc.w     $2F3C
  5745.             dc.w     $0010
  5746.             dc.w     $0103
  5747.             moveq    #0,d0
  5748.             dc.w     $A82A
  5749.         EndM
  5750.     ELSE
  5751.         IMPORT_CFM_FUNCTION    DataHPlaybackHints
  5752.     ENDIF
  5753.  
  5754.  
  5755. kDataHGetDataSelect                EQU        $2
  5756. kDataHPutDataSelect                EQU        $3
  5757. kDataHFlushDataSelect            EQU        $4
  5758. kDataHOpenForWriteSelect        EQU        $5
  5759. kDataHCloseForWriteSelect        EQU        $6
  5760. kDataHOpenForReadSelect            EQU        $8
  5761. kDataHCloseForReadSelect        EQU        $9
  5762. kDataHSetDataRefSelect            EQU        $A
  5763. kDataHGetDataRefSelect            EQU        $B
  5764. kDataHCompareDataRefSelect        EQU        $C
  5765. kDataHTaskSelect                EQU        $D
  5766. kDataHScheduleDataSelect        EQU        $E
  5767. kDataHFinishDataSelect            EQU        $F
  5768. kDataHFlushCacheSelect            EQU        $10
  5769. kDataHResolveDataRefSelect        EQU        $11
  5770. kDataHGetFileSizeSelect            EQU        $12
  5771. kDataHCanUseDataRefSelect        EQU        $13
  5772. kDataHGetVolumeListSelect        EQU        $14
  5773. kDataHWriteSelect                EQU        $15
  5774. kDataHPreextendSelect            EQU        $16
  5775. kDataHSetFileSizeSelect            EQU        $17
  5776. kDataHGetFreeSpaceSelect        EQU        $18
  5777. kDataHCreateFileSelect            EQU        $19
  5778. kDataHGetPreferredBlockSizeSelect EQU        $1A
  5779. kDataHGetDeviceIndexSelect        EQU        $1B
  5780. kDataHIsStreamingDataHandlerSelect EQU        $1C
  5781. kDataHGetDataInBufferSelect        EQU        $1D
  5782. kDataHGetScheduleAheadTimeSelect EQU        $1E
  5783. kDataHSetCacheSizeLimitSelect    EQU        $1F
  5784. kDataHGetCacheSizeLimitSelect    EQU        $20
  5785. kDataHPlaybackHintsSelect        EQU        $103
  5786.  
  5787. kMusicComponentType                EQU        'musi'
  5788.  
  5789. ; typedef ComponentInstance  MusicComponent
  5790. ; MusicSynthesizerFlags
  5791.  
  5792. kSynthesizerDynamicVoice        EQU        1                    ; can reassign voices/channels (else, hogs all channels in mask 
  5793. kSynthesizerUsesMIDIPort        EQU        2                    ; must be patched through MIDI Manager 
  5794. kSynthesizerMicrotone            EQU        4                    ; can play microtonal scales 
  5795. kSynthesizerLimitedMicrotone    EQU        8                    ; can play microtones, but only on 1-voice parts 
  5796. kSynthesizerMixedDrums            EQU        16                    ; any part can play drum parts, total = instrument parts 
  5797. kSynthesizerSoftware            EQU        32                    ; implemented in main CPU software == uses cpu cycles 
  5798. kSynthesizerGMSuperset            EQU        8192
  5799. kSynthesizerGM                    EQU        16384                ; synth is a GM device 
  5800.  
  5801. ;
  5802. ; * Note that these controller numbers
  5803. ; * are _not_ identical to the MIDI controller numbers.
  5804. ; * These are _signed_ 8.8 values, and the LSB's are
  5805. ; * always sent to a MIDI device. Controllers 32-63 are
  5806. ; * reserved (for MIDI, they are LSB's for 0-31, but we
  5807. ; * always send both).
  5808. ; *
  5809. ; * The full range, therefore, is -128.00 to 127.7f.
  5810. ; *
  5811. ; * _Excepting_ _volume_, all controls default to zero.
  5812. ; *
  5813. ; * Pitch bend is specified in fractional semitones! No
  5814. ; * more "pitch bend range" nonsense. You can bend as far
  5815. ; * as you want, any time you want.
  5816. kControllerModulationWheel        EQU        1
  5817. kControllerBreath                EQU        2
  5818. kControllerFoot                    EQU        4
  5819. kControllerPortamentoTime        EQU        5
  5820. kControllerVolume                EQU        7
  5821. kControllerBalance                EQU        8
  5822. kControllerPan                    EQU        10                    ; 0 - "default", 1 - n: positioned in output 1-n (incl fractions) 
  5823. kControllerExpression            EQU        11
  5824. kControllerPitchBend            EQU        32                    ; positive & negative semitones, with 7 bits fraction 
  5825. kControllerAfterTouch            EQU        33
  5826. kControllerSustain                EQU        64                    ; boolean - positive for on, 0 or negative off 
  5827. kControllerPortamento            EQU        65                    ; boolean 
  5828. kControllerSostenuto            EQU        66                    ; boolean 
  5829. kControllerSoftPedal            EQU        67                    ; boolean 
  5830. kControllerReverb                EQU        91
  5831. kControllerTremolo                EQU        92
  5832. kControllerChorus                EQU        93
  5833. kControllerCeleste                EQU        94
  5834. kControllerPhaser                EQU        95
  5835.  
  5836. kControllerMaximum                EQU        $7FFF                ; +01111111.11111111 
  5837. kControllerMinimum                EQU        $8000                ; -10000000.00000000 
  5838.  
  5839. SynthesizerDescription     RECORD    0
  5840. synthesizerType             ds.l   1        ; offset: $0 (0)        ; synthesizer type (must be same as component subtype) 
  5841. name                     ds.l   8        ; offset: $4 (4)        ; text name of synthesizer type 
  5842. flags                     ds.l   1        ; offset: $24 (36)        ; from the above enum 
  5843. voiceCount                 ds.l   1        ; offset: $28 (40)        ; maximum polyphony 
  5844. partCount                 ds.l   1        ; offset: $2C (44)        ; maximum multi-timbrality (and midi channels) 
  5845. instrumentCount             ds.l   1        ; offset: $30 (48)        ; non gm, built in (rom) instruments only 
  5846. modifiableInstrumentCount ds.l   1        ; offset: $34 (52)        ; plus n-more are user modifiable 
  5847. channelMask                 ds.l   1        ; offset: $38 (56)        ; (midi device only) which channels device always uses 
  5848. drumPartCount             ds.l   1        ; offset: $3C (60)        ; maximum multi-timbrality of drum parts 
  5849. drumCount                 ds.l   1        ; offset: $40 (64)        ; non gm, built in (rom) drumkits only 
  5850. modifiableDrumCount         ds.l   1        ; offset: $44 (68)        ; plus n-more are user modifiable 
  5851. drumChannelMask             ds.l   1        ; offset: $48 (72)        ; (midi device only) which channels device always uses 
  5852. outputCount                 ds.l   1        ; offset: $4C (76)        ; number of audio outputs (usually two) 
  5853. latency                     ds.l   1        ; offset: $50 (80)        ; response time in µSec 
  5854. controllers                 ds.l   4        ; offset: $54 (84)        ; array of 128 bits 
  5855. gmInstruments             ds.l   4        ; offset: $64 (100)        ; array of 128 bits 
  5856. gmDrums                     ds.l   4        ; offset: $74 (116)        ; array of 128 bits 
  5857. sizeof                     EQU *            ; size:   $84 (132)
  5858.                         ENDR
  5859.  
  5860. ; typedef struct SynthesizerDescription  SynthesizerDescription
  5861.  
  5862. kVoiceCountDynamic                EQU        -1                    ; constant to use to specify dynamic voicing 
  5863.  
  5864. ToneDescription         RECORD    0
  5865. synthesizerType             ds.l   1        ; offset: $0 (0)        ; synthesizer type 
  5866. synthesizerName             ds.l   8        ; offset: $4 (4)        ; name of instantiation of synth 
  5867. instrumentName             ds.l   8        ; offset: $24 (36)        ; preferred name for human use 
  5868. instrumentNumber         ds.l   1        ; offset: $44 (68)        ; inst-number used if synth-name matches 
  5869. gmNumber                 ds.l   1        ; offset: $48 (72)        ; Best matching general MIDI number 
  5870. sizeof                     EQU *            ; size:   $4C (76)
  5871.                         ENDR
  5872.  
  5873. ; typedef struct ToneDescription  ToneDescription
  5874.  
  5875. kFirstDrumkit                    EQU        16384                ; (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! 
  5876. kLastDrumkit                    EQU        (kFirstDrumkit + 128)
  5877.  
  5878. ; InstrumentMatch
  5879. kInstrumentMatchSynthesizerType    EQU        1
  5880. kInstrumentMatchSynthesizerName    EQU        2
  5881. kInstrumentMatchName            EQU        4
  5882. kInstrumentMatchNumber            EQU        8
  5883. kInstrumentMatchGMNumber        EQU        16
  5884.  
  5885. ; KnobFlags
  5886. kKnobRealtime                    EQU        1                    ; Knob can be changed interactively as part of a sequence (ie knob can be changed at interrupt time) 
  5887. kKnobNextNote                    EQU        2                    ; Knob only takes effect on the next note played 
  5888. kKnobAction                        EQU        4                    ; setting the knob does something immediate 
  5889. kKnobNotInstrument                EQU        8                    ; indicates that the knob isn't in the instrument handle 
  5890. kKnobAffectsOthers                EQU        16                    ; other knobs will change value from this one 
  5891. kKnobMinorGroupStart            EQU        64                    ; knob is first in some logical subgroup of knobs 
  5892. kKnobGroupStart                    EQU        128                    ; knob is first in some logical group of knobs 
  5893. ; One of these may be used at a time. 
  5894. kKnobTypeNumber                    EQU        0 << 12
  5895. kKnobTypeBoolean                EQU        1 << 12
  5896. kKnobTypeNote                    EQU        2 << 12
  5897. kKnobTypePan                    EQU        3 << 12
  5898. kKnobTypeInstrument                EQU        4 << 12                ; knob value = reference to another instrument number 
  5899. kKnobTypeSetting                EQU        5 << 12                ; knob value is 1 of n different things (eg, fm algorithms) 
  5900.  
  5901. kUnknownKnobValue                EQU        $7FFFFFFF            ; a knob with this value means, we don't know it. 
  5902.  
  5903. KnobDescription         RECORD    0
  5904. name                     ds.l   8        ; offset: $0 (0)
  5905. lowValue                 ds.l   1        ; offset: $20 (32)
  5906. highValue                 ds.l   1        ; offset: $24 (36)
  5907. defaultValue             ds.l   1        ; offset: $28 (40)        ; a default instrument is made of all default values 
  5908. flags                     ds.l   1        ; offset: $2C (44)
  5909. sizeof                     EQU *            ; size:   $30 (48)
  5910.                         ENDR
  5911.  
  5912. ; typedef struct KnobDescription  KnobDescription
  5913. InstrumentData             RECORD    0
  5914. tone                     ds     ToneDescription ; offset: $0 (0)
  5915. knobCount                 ds.l   1        ; offset: $4C (76)
  5916. knob                     ds.l   1        ; offset: $50 (80)
  5917. sizeof                     EQU *            ; size:   $54 (84)
  5918.                         ENDR
  5919.  
  5920. ; typedef struct InstrumentData  InstrumentData, **InstrumentDataHandle
  5921. FlatInstrument             RECORD    0
  5922. tone                     ds     ToneDescription ; offset: $0 (0)
  5923. size                     ds.l   1        ; offset: $4C (76)        ; size in bytes of the following data, including size field (excluding tonedescription) 
  5924. data                     ds.b   4        ; offset: $50 (80)
  5925. sizeof                     EQU *            ; size:   $54 (84)
  5926.                         ENDR
  5927.  
  5928. ; typedef struct FlatInstrument  FlatInstrument
  5929. InstrumentAboutInfo     RECORD    0
  5930. p                         ds.l   1        ; offset: $0 (0)
  5931. author                     ds.l   64        ; offset: $4 (4)
  5932. copyright                 ds.l   64        ; offset: $104 (260)
  5933. other                     ds.l   64        ; offset: $204 (516)
  5934. sizeof                     EQU *            ; size:   $304 (772)
  5935.                         ENDR
  5936.  
  5937. ; typedef struct InstrumentAboutInfo  InstrumentAboutInfo
  5938. MusicMIDIPacket         RECORD    0
  5939. length                     ds.w   1        ; offset: $0 (0)
  5940. reserved                 ds.l   1        ; offset: $2 (2)
  5941. data                     ds.b   249        ; offset: $6 (6)
  5942.                          ORG 256
  5943. sizeof                     EQU *            ; size:   $100 (256)
  5944.                         ENDR
  5945.  
  5946. ; typedef struct MusicMIDIPacket  MusicMIDIPacket
  5947.  
  5948. kMusicFirstSelect                EQU        0
  5949. kMusicGetDescriptionSelect        EQU        1
  5950. kMusicGetPartSelect                EQU        2
  5951. kMusicSetPartSelect                EQU        3
  5952. kMusicSetInstrumentNumberSelect    EQU        4
  5953. kMusicGetInstrumentNumberSelect    EQU        5
  5954. kMusicStoreInstrumentSelect        EQU        6
  5955. kMusicGetInstrumentSelect        EQU        7
  5956. kMusicSetInstrumentSelect        EQU        8
  5957. kMusicDummyOne                    EQU        9
  5958. kMusicDummyTwo                    EQU        10
  5959. kMusicDummyThree                EQU        11
  5960. kMusicDummyFour                    EQU        12
  5961. kMusicGetInstrumentKnobDescriptionSelect EQU        13
  5962. kMusicGetDrumKnobDescriptionSelect EQU        14
  5963. kMusicGetKnobDescriptionSelect    EQU        15
  5964. kMusicGetPartKnobSelect            EQU        16
  5965. kMusicSetPartKnobSelect            EQU        17
  5966. kMusicGetKnobSelect                EQU        18
  5967. kMusicSetKnobSelect                EQU        19
  5968. kMusicGetPartNameSelect            EQU        20
  5969. kMusicSetPartNameSelect            EQU        21
  5970. kMusicFindToneSelect            EQU        22
  5971. kMusicPlayNoteSelect            EQU        23
  5972. kMusicResetPartSelect            EQU        24
  5973. kMusicSetControllerSelect        EQU        25
  5974. kMusicGetControllerSelect        EQU        26
  5975. kMusicGetMIDIProcSelect            EQU        27
  5976. kMusicSetMIDIProcSelect            EQU        28
  5977. kMusicGetInstrumentNamesSelect    EQU        29
  5978. kMusicGetDrumNamesSelect        EQU        30
  5979. kMusicGetMasterTuneSelect        EQU        31
  5980. kMusicSetMasterTuneSelect        EQU        32
  5981. kMusicSetFlatInstrumentSelect    EQU        33
  5982. kMusicGetInstrumentAboutInfoSelect EQU        34
  5983.  
  5984. notImplementedMusicErr            EQU        ($80000000 | ((-2100 - 1)))
  5985. cantSendToSynthesizerErr        EQU        ($80000000 | ((-2100 - 2)))
  5986. cantReceiveFromSynthesizerErr    EQU        ($80000000 | ((-2100 - 3)))
  5987. illegalVoiceAllocationErr        EQU        ($80000000 | ((-2100 - 4)))
  5988. illegalPartErr                    EQU        ($80000000 | ((-2100 - 5)))
  5989. illegalChannelErr                EQU        ($80000000 | ((-2100 - 6)))
  5990. illegalKnobErr                    EQU        ($80000000 | ((-2100 - 7)))
  5991. illegalKnobValueErr                EQU        ($80000000 | ((-2100 - 8)))
  5992. illegalInstrumentErr            EQU        ($80000000 | ((-2100 - 9)))
  5993. illegalControllerErr            EQU        ($80000000 | ((-2100 - 10)))
  5994. midiManagerAbsentErr            EQU        ($80000000 | ((-2100 - 11)))
  5995. synthesizerNotRespondingErr        EQU        ($80000000 | ((-2100 - 12)))
  5996. synthesizerErr                    EQU        ($80000000 | ((-2100 - 13)))
  5997. illegalNoteChannelErr            EQU        ($80000000 | ((-2100 - 14)))
  5998. noteChannelNotAllocatedErr        EQU        ($80000000 | ((-2100 - 15)))
  5999. tunePlayerFullErr                EQU        ($80000000 | ((-2100 - 16)))
  6000. tuneParseErr                    EQU        ($80000000 | ((-2100 - 17)))
  6001.  
  6002. kGMType                            EQU        'gm  '
  6003.  
  6004. ;-----------------------------------------
  6005. ;    Capabilities and Voice Allocation
  6006. ;-----------------------------------------
  6007. ;
  6008. ; pascal ComponentResult MusicGetPart(MusicComponent mc, long part, long *midiChannel, long *polyphony)
  6009. ;
  6010.     IF ¬ GENERATINGCFM THEN
  6011.         Macro
  6012.         _MusicGetPart
  6013.             dc.w     $2F3C
  6014.             dc.w     $000C
  6015.             dc.w     $0002
  6016.             moveq    #0,d0
  6017.             dc.w     $A82A
  6018.         EndM
  6019.     ELSE
  6020.         IMPORT_CFM_FUNCTION    MusicGetPart
  6021.     ENDIF
  6022.  
  6023. ;
  6024. ; pascal ComponentResult MusicSetPart(MusicComponent mc, long part, long midiChannel, long polyphony)
  6025. ;
  6026.     IF ¬ GENERATINGCFM THEN
  6027.         Macro
  6028.         _MusicSetPart
  6029.             dc.w     $2F3C
  6030.             dc.w     $000C
  6031.             dc.w     $0003
  6032.             moveq    #0,d0
  6033.             dc.w     $A82A
  6034.         EndM
  6035.     ELSE
  6036.         IMPORT_CFM_FUNCTION    MusicSetPart
  6037.     ENDIF
  6038.  
  6039. ;
  6040. ; pascal ComponentResult MusicGetDescription(MusicComponent mc, SynthesizerDescription *sd)
  6041. ;
  6042.     IF ¬ GENERATINGCFM THEN
  6043.         Macro
  6044.         _MusicGetDescription
  6045.             dc.w     $2F3C
  6046.             dc.w     $0004
  6047.             dc.w     $0001
  6048.             moveq    #0,d0
  6049.             dc.w     $A82A
  6050.         EndM
  6051.     ELSE
  6052.         IMPORT_CFM_FUNCTION    MusicGetDescription
  6053.     ENDIF
  6054.  
  6055. ;
  6056. ; pascal ComponentResult MusicGetInstrumentAboutInfo(MusicComponent mc, long part, InstrumentAboutInfo *iai)
  6057. ;
  6058.     IF ¬ GENERATINGCFM THEN
  6059.         Macro
  6060.         _MusicGetInstrumentAboutInfo
  6061.             dc.w     $2F3C
  6062.             dc.w     $0008
  6063.             dc.w     $0022
  6064.             moveq    #0,d0
  6065.             dc.w     $A82A
  6066.         EndM
  6067.     ELSE
  6068.         IMPORT_CFM_FUNCTION    MusicGetInstrumentAboutInfo
  6069.     ENDIF
  6070.  
  6071. ;-----------------------------------------
  6072. ;    Instrument Loading and Storing
  6073. ;-----------------------------------------
  6074. ;
  6075. ; pascal ComponentResult MusicSetInstrumentNumber(MusicComponent mc, long part, long instrumentNumber)
  6076. ;
  6077.     IF ¬ GENERATINGCFM THEN
  6078.         Macro
  6079.         _MusicSetInstrumentNumber
  6080.             dc.w     $2F3C
  6081.             dc.w     $0008
  6082.             dc.w     $0004
  6083.             moveq    #0,d0
  6084.             dc.w     $A82A
  6085.         EndM
  6086.     ELSE
  6087.         IMPORT_CFM_FUNCTION    MusicSetInstrumentNumber
  6088.     ENDIF
  6089.  
  6090. ;
  6091. ; pascal ComponentResult MusicGetInstrumentNumber(MusicComponent mc, long part)
  6092. ;
  6093.     IF ¬ GENERATINGCFM THEN
  6094.         Macro
  6095.         _MusicGetInstrumentNumber
  6096.             dc.w     $2F3C
  6097.             dc.w     $0004
  6098.             dc.w     $0005
  6099.             moveq    #0,d0
  6100.             dc.w     $A82A
  6101.         EndM
  6102.     ELSE
  6103.         IMPORT_CFM_FUNCTION    MusicGetInstrumentNumber
  6104.     ENDIF
  6105.  
  6106. ;
  6107. ; pascal ComponentResult MusicStoreInstrument(MusicComponent mc, long part, long instrumentNumber)
  6108. ;
  6109.     IF ¬ GENERATINGCFM THEN
  6110.         Macro
  6111.         _MusicStoreInstrument
  6112.             dc.w     $2F3C
  6113.             dc.w     $0008
  6114.             dc.w     $0006
  6115.             moveq    #0,d0
  6116.             dc.w     $A82A
  6117.         EndM
  6118.     ELSE
  6119.         IMPORT_CFM_FUNCTION    MusicStoreInstrument
  6120.     ENDIF
  6121.  
  6122. ;
  6123. ; pascal ComponentResult MusicGetInstrument(MusicComponent mc, long part, InstrumentDataHandle *iH)
  6124. ;
  6125.     IF ¬ GENERATINGCFM THEN
  6126.         Macro
  6127.         _MusicGetInstrument
  6128.             dc.w     $2F3C
  6129.             dc.w     $0008
  6130.             dc.w     $0007
  6131.             moveq    #0,d0
  6132.             dc.w     $A82A
  6133.         EndM
  6134.     ELSE
  6135.         IMPORT_CFM_FUNCTION    MusicGetInstrument
  6136.     ENDIF
  6137.  
  6138. ;
  6139. ; pascal ComponentResult MusicSetInstrument(MusicComponent mc, long part, InstrumentDataHandle iH)
  6140. ;
  6141.     IF ¬ GENERATINGCFM THEN
  6142.         Macro
  6143.         _MusicSetInstrument
  6144.             dc.w     $2F3C
  6145.             dc.w     $0008
  6146.             dc.w     $0008
  6147.             moveq    #0,d0
  6148.             dc.w     $A82A
  6149.         EndM
  6150.     ELSE
  6151.         IMPORT_CFM_FUNCTION    MusicSetInstrument
  6152.     ENDIF
  6153.  
  6154. ;
  6155. ; pascal ComponentResult MusicSetFlatInstrument(MusicComponent mc, long part, FlatInstrument *flatInstrument)
  6156. ;
  6157.     IF ¬ GENERATINGCFM THEN
  6158.         Macro
  6159.         _MusicSetFlatInstrument
  6160.             dc.w     $2F3C
  6161.             dc.w     $0008
  6162.             dc.w     $0021
  6163.             moveq    #0,d0
  6164.             dc.w     $A82A
  6165.         EndM
  6166.     ELSE
  6167.         IMPORT_CFM_FUNCTION    MusicSetFlatInstrument
  6168.     ENDIF
  6169.  
  6170. ;-----------------------------------------
  6171. ;    Instrument Knobs
  6172. ;-----------------------------------------
  6173. ;
  6174. ; pascal ComponentResult MusicGetInstrumentKnobDescription(MusicComponent mc, long knobNumber, KnobDescription *mkd)
  6175. ;
  6176.     IF ¬ GENERATINGCFM THEN
  6177.         Macro
  6178.         _MusicGetInstrumentKnobDescription
  6179.             dc.w     $2F3C
  6180.             dc.w     $0008
  6181.             dc.w     $000D
  6182.             moveq    #0,d0
  6183.             dc.w     $A82A
  6184.         EndM
  6185.     ELSE
  6186.         IMPORT_CFM_FUNCTION    MusicGetInstrumentKnobDescription
  6187.     ENDIF
  6188.  
  6189. ;
  6190. ; pascal ComponentResult MusicGetDrumKnobDescription(MusicComponent mc, long knobNumber, KnobDescription *mkd)
  6191. ;
  6192.     IF ¬ GENERATINGCFM THEN
  6193.         Macro
  6194.         _MusicGetDrumKnobDescription
  6195.             dc.w     $2F3C
  6196.             dc.w     $0008
  6197.             dc.w     $000E
  6198.             moveq    #0,d0
  6199.             dc.w     $A82A
  6200.         EndM
  6201.     ELSE
  6202.         IMPORT_CFM_FUNCTION    MusicGetDrumKnobDescription
  6203.     ENDIF
  6204.  
  6205. ;
  6206. ; pascal ComponentResult MusicGetPartKnob(MusicComponent mc, long part, long knobNumber)
  6207. ;
  6208.     IF ¬ GENERATINGCFM THEN
  6209.         Macro
  6210.         _MusicGetPartKnob
  6211.             dc.w     $2F3C
  6212.             dc.w     $0008
  6213.             dc.w     $0010
  6214.             moveq    #0,d0
  6215.             dc.w     $A82A
  6216.         EndM
  6217.     ELSE
  6218.         IMPORT_CFM_FUNCTION    MusicGetPartKnob
  6219.     ENDIF
  6220.  
  6221. ;
  6222. ; pascal ComponentResult MusicSetPartKnob(MusicComponent mc, long part, long knobNumber, long knobValue)
  6223. ;
  6224.     IF ¬ GENERATINGCFM THEN
  6225.         Macro
  6226.         _MusicSetPartKnob
  6227.             dc.w     $2F3C
  6228.             dc.w     $000C
  6229.             dc.w     $0011
  6230.             moveq    #0,d0
  6231.             dc.w     $A82A
  6232.         EndM
  6233.     ELSE
  6234.         IMPORT_CFM_FUNCTION    MusicSetPartKnob
  6235.     ENDIF
  6236.  
  6237. ;-----------------------------------------
  6238. ;    Synthesizer Knobs
  6239. ;-----------------------------------------
  6240. ;
  6241. ; pascal ComponentResult MusicGetKnobDescription(MusicComponent mc, long knobNumber, KnobDescription *mkd)
  6242. ;
  6243.     IF ¬ GENERATINGCFM THEN
  6244.         Macro
  6245.         _MusicGetKnobDescription
  6246.             dc.w     $2F3C
  6247.             dc.w     $0008
  6248.             dc.w     $000F
  6249.             moveq    #0,d0
  6250.             dc.w     $A82A
  6251.         EndM
  6252.     ELSE
  6253.         IMPORT_CFM_FUNCTION    MusicGetKnobDescription
  6254.     ENDIF
  6255.  
  6256. ;
  6257. ; pascal ComponentResult MusicGetKnob(MusicComponent mc, long knobNumber)
  6258. ;
  6259.     IF ¬ GENERATINGCFM THEN
  6260.         Macro
  6261.         _MusicGetKnob
  6262.             dc.w     $2F3C
  6263.             dc.w     $0004
  6264.             dc.w     $0012
  6265.             moveq    #0,d0
  6266.             dc.w     $A82A
  6267.         EndM
  6268.     ELSE
  6269.         IMPORT_CFM_FUNCTION    MusicGetKnob
  6270.     ENDIF
  6271.  
  6272. ;
  6273. ; pascal ComponentResult MusicSetKnob(MusicComponent mc, long knobNumber, long knobValue)
  6274. ;
  6275.     IF ¬ GENERATINGCFM THEN
  6276.         Macro
  6277.         _MusicSetKnob
  6278.             dc.w     $2F3C
  6279.             dc.w     $0008
  6280.             dc.w     $0013
  6281.             moveq    #0,d0
  6282.             dc.w     $A82A
  6283.         EndM
  6284.     ELSE
  6285.         IMPORT_CFM_FUNCTION    MusicSetKnob
  6286.     ENDIF
  6287.  
  6288. ;
  6289. ; pascal ComponentResult MusicSetMasterTune(MusicComponent mc, Fixed masterTune)
  6290. ;
  6291.     IF ¬ GENERATINGCFM THEN
  6292.         Macro
  6293.         _MusicSetMasterTune
  6294.             dc.w     $2F3C
  6295.             dc.w     $0004
  6296.             dc.w     $0020
  6297.             moveq    #0,d0
  6298.             dc.w     $A82A
  6299.         EndM
  6300.     ELSE
  6301.         IMPORT_CFM_FUNCTION    MusicSetMasterTune
  6302.     ENDIF
  6303.  
  6304. ;
  6305. ; pascal ComponentResult MusicGetMasterTune(MusicComponent mc)
  6306. ;
  6307.     IF ¬ GENERATINGCFM THEN
  6308.         Macro
  6309.         _MusicGetMasterTune
  6310.             dc.w     $2F3C
  6311.             dc.w     $0000
  6312.             dc.w     $001F
  6313.             moveq    #0,d0
  6314.             dc.w     $A82A
  6315.         EndM
  6316.     ELSE
  6317.         IMPORT_CFM_FUNCTION    MusicGetMasterTune
  6318.     ENDIF
  6319.  
  6320. ;-----------------------------------------
  6321. ;    Names of Instruments
  6322. ;-----------------------------------------
  6323. ;
  6324. ; pascal ComponentResult MusicGetPartName(MusicComponent mc, long part, Str31 name)
  6325. ;
  6326.     IF ¬ GENERATINGCFM THEN
  6327.         Macro
  6328.         _MusicGetPartName
  6329.             dc.w     $2F3C
  6330.             dc.w     $0008
  6331.             dc.w     $0014
  6332.             moveq    #0,d0
  6333.             dc.w     $A82A
  6334.         EndM
  6335.     ELSE
  6336.         IMPORT_CFM_FUNCTION    MusicGetPartName
  6337.     ENDIF
  6338.  
  6339. ;
  6340. ; pascal ComponentResult MusicSetPartName(MusicComponent mc, long part, Str31 name)
  6341. ;
  6342.     IF ¬ GENERATINGCFM THEN
  6343.         Macro
  6344.         _MusicSetPartName
  6345.             dc.w     $2F3C
  6346.             dc.w     $0008
  6347.             dc.w     $0015
  6348.             moveq    #0,d0
  6349.             dc.w     $A82A
  6350.         EndM
  6351.     ELSE
  6352.         IMPORT_CFM_FUNCTION    MusicSetPartName
  6353.     ENDIF
  6354.  
  6355. ;
  6356. ; pascal ComponentResult MusicFindTone(MusicComponent mc, ToneDescription *td, long *instrumentNumber, unsigned long *fit)
  6357. ;
  6358.     IF ¬ GENERATINGCFM THEN
  6359.         Macro
  6360.         _MusicFindTone
  6361.             dc.w     $2F3C
  6362.             dc.w     $000C
  6363.             dc.w     $0016
  6364.             moveq    #0,d0
  6365.             dc.w     $A82A
  6366.         EndM
  6367.     ELSE
  6368.         IMPORT_CFM_FUNCTION    MusicFindTone
  6369.     ENDIF
  6370.  
  6371. ;
  6372. ; pascal ComponentResult MusicGetInstrumentNames(MusicComponent mc, long modifiableInstruments, Handle *instrumentNames, Handle *instrumentCategoryLasts, Handle *instrumentCategoryNames)
  6373. ;
  6374.     IF ¬ GENERATINGCFM THEN
  6375.         Macro
  6376.         _MusicGetInstrumentNames
  6377.             dc.w     $2F3C
  6378.             dc.w     $0010
  6379.             dc.w     $001D
  6380.             moveq    #0,d0
  6381.             dc.w     $A82A
  6382.         EndM
  6383.     ELSE
  6384.         IMPORT_CFM_FUNCTION    MusicGetInstrumentNames
  6385.     ENDIF
  6386.  
  6387. ;
  6388. ; pascal ComponentResult MusicGetDrumNames(MusicComponent mc, long modifiableInstruments, Handle *instrumentNumbers, Handle *instrumentNames)
  6389. ;
  6390.     IF ¬ GENERATINGCFM THEN
  6391.         Macro
  6392.         _MusicGetDrumNames
  6393.             dc.w     $2F3C
  6394.             dc.w     $000C
  6395.             dc.w     $001E
  6396.             moveq    #0,d0
  6397.             dc.w     $A82A
  6398.         EndM
  6399.     ELSE
  6400.         IMPORT_CFM_FUNCTION    MusicGetDrumNames
  6401.     ENDIF
  6402.  
  6403. ;-----------------------------------------
  6404. ;    Realtime Actions
  6405. ;-----------------------------------------
  6406. ;
  6407. ; pascal ComponentResult MusicPlayNote(MusicComponent mc, long part, long pitch, long velocity)
  6408. ;
  6409.     IF ¬ GENERATINGCFM THEN
  6410.         Macro
  6411.         _MusicPlayNote
  6412.             dc.w     $2F3C
  6413.             dc.w     $000C
  6414.             dc.w     $0017
  6415.             moveq    #0,d0
  6416.             dc.w     $A82A
  6417.         EndM
  6418.     ELSE
  6419.         IMPORT_CFM_FUNCTION    MusicPlayNote
  6420.     ENDIF
  6421.  
  6422. ;
  6423. ; pascal ComponentResult MusicResetPart(MusicComponent mc, long part)
  6424. ;
  6425.     IF ¬ GENERATINGCFM THEN
  6426.         Macro
  6427.         _MusicResetPart
  6428.             dc.w     $2F3C
  6429.             dc.w     $0004
  6430.             dc.w     $0018
  6431.             moveq    #0,d0
  6432.             dc.w     $A82A
  6433.         EndM
  6434.     ELSE
  6435.         IMPORT_CFM_FUNCTION    MusicResetPart
  6436.     ENDIF
  6437.  
  6438. ;
  6439. ; pascal ComponentResult MusicSetController(MusicComponent mc, long part, long controllerNumber, long controllerValue)
  6440. ;
  6441.     IF ¬ GENERATINGCFM THEN
  6442.         Macro
  6443.         _MusicSetController
  6444.             dc.w     $2F3C
  6445.             dc.w     $000C
  6446.             dc.w     $0019
  6447.             moveq    #0,d0
  6448.             dc.w     $A82A
  6449.         EndM
  6450.     ELSE
  6451.         IMPORT_CFM_FUNCTION    MusicSetController
  6452.     ENDIF
  6453.  
  6454. ;
  6455. ; pascal ComponentResult MusicGetController(MusicComponent mc, long part, long controllerNumber)
  6456. ;
  6457.     IF ¬ GENERATINGCFM THEN
  6458.         Macro
  6459.         _MusicGetController
  6460.             dc.w     $2F3C
  6461.             dc.w     $0008
  6462.             dc.w     $001A
  6463.             moveq    #0,d0
  6464.             dc.w     $A82A
  6465.         EndM
  6466.     ELSE
  6467.         IMPORT_CFM_FUNCTION    MusicGetController
  6468.     ENDIF
  6469.  
  6470. ;-----------------------------------------
  6471. ;    Finding the Hardware
  6472. ;-----------------------------------------
  6473. ;
  6474. ; pascal ComponentResult MusicGetMIDIProc(MusicComponent mc, MusicMIDISendUPP *midiSendProc, long *refCon)
  6475. ;
  6476.     IF ¬ GENERATINGCFM THEN
  6477.         Macro
  6478.         _MusicGetMIDIProc
  6479.             dc.w     $2F3C
  6480.             dc.w     $0008
  6481.             dc.w     $001B
  6482.             moveq    #0,d0
  6483.             dc.w     $A82A
  6484.         EndM
  6485.     ELSE
  6486.         IMPORT_CFM_FUNCTION    MusicGetMIDIProc
  6487.     ENDIF
  6488.  
  6489. ;
  6490. ; pascal ComponentResult MusicSetMIDIProc(MusicComponent mc, MusicMIDISendUPP midiSendProc, long refCon)
  6491. ;
  6492.     IF ¬ GENERATINGCFM THEN
  6493.         Macro
  6494.         _MusicSetMIDIProc
  6495.             dc.w     $2F3C
  6496.             dc.w     $0008
  6497.             dc.w     $001C
  6498.             moveq    #0,d0
  6499.             dc.w     $A82A
  6500.         EndM
  6501.     ELSE
  6502.         IMPORT_CFM_FUNCTION    MusicSetMIDIProc
  6503.     ENDIF
  6504.  
  6505. ;--------------------------
  6506. ;    Types
  6507. ;--------------------------
  6508. ; typedef void                 *NoteChannel
  6509. SynthesizerConnections     RECORD    0
  6510. clientID                 ds.l   1        ; offset: $0 (0)
  6511. inputPortID                 ds.l   1        ; offset: $4 (4)
  6512. outputPortID             ds.l   1        ; offset: $8 (8)
  6513. midiChannel                 ds.l   1        ; offset: $C (12)        ; The system channel; others are configurable (or the nubus slot number) 
  6514. flags                     ds.l   1        ; offset: $10 (16)
  6515. reserved                 ds.l   3        ; offset: $14 (20)        ; should be zero 
  6516. sizeof                     EQU *            ; size:   $20 (32)
  6517.                         ENDR
  6518.  
  6519. ; typedef struct SynthesizerConnections  SynthesizerConnections
  6520. NoteRequest             RECORD    0
  6521. polyphony                 ds.l   1        ; offset: $0 (0)        ; Maximum number of voices 
  6522. typicalPolyphony         ds.l   1        ; offset: $4 (4)        ; Hint for level mixing 
  6523. tone                     ds     ToneDescription ; offset: $8 (8)
  6524. sizeof                     EQU *            ; size:   $54 (84)
  6525.                         ENDR
  6526.  
  6527. ; typedef struct NoteRequest  NoteRequest
  6528.  
  6529. kNAFirstSelector                EQU        -7
  6530. kNATargetSelect                    EQU        -6
  6531. kNARegisterSelect                EQU        -5
  6532. kNAVersionSelect                EQU        -4
  6533. kNACanDoSelect                    EQU        -3
  6534. kNACloseSelect                    EQU        -2
  6535. kNAOpenSelect                    EQU        -1
  6536. kNARegisterMusicDeviceSelect    EQU        0
  6537. kNAUnregisterMusicDeviceSelect    EQU        1
  6538. kNAGetRegisteredMusicDeviceSelect EQU        2
  6539. kNASaveMusicConfigurationSelect    EQU        3
  6540. kNANewNoteChannelSelect            EQU        4
  6541. kNADisposeNoteChannelSelect        EQU        5
  6542. kNAGetNoteChannelInfoSelect        EQU        6
  6543. kNAPrerollNoteChannelSelect        EQU        7
  6544. kNAUnrollNoteChannelSelect        EQU        8
  6545. kNAEngageNoteChannelSelect        EQU        9
  6546. kNADisengageNoteChannelSelect    EQU        10
  6547. kNASetNoteChannelVolumeSelect    EQU        11
  6548. kNAResetNoteChannelSelect        EQU        12
  6549. kNAPlayNoteSelect                EQU        13
  6550. kNASetControllerSelect            EQU        14
  6551. kNASetKnobSelect                EQU        15
  6552. kNAFindNoteChannelToneSelect    EQU        16
  6553. kNASetNoteChannelInstrumentSelect EQU        17
  6554. kNAPickInstrumentSelect            EQU        18
  6555. kNAPickArrangementSelect        EQU        19
  6556. kNAGetStatusBlockSelect            EQU        20
  6557. kNASetDefaultMIDIInputSelect    EQU        21
  6558. kNAGetDefaultMIDIInputSelect    EQU        22
  6559. kNAGetNoteChannelStateSelect    EQU        23
  6560. kNASetNoteChannelStateSelect    EQU        24
  6561. kNAUseDefaultMIDIInputSelect    EQU        25
  6562. kNALoseDefaultMIDIInputSelect    EQU        26
  6563. kNAStuffToneDescriptionSelect    EQU        27
  6564. kNACopyrightDialogSelect        EQU        28
  6565. kNASetFlatInstrumentSelect        EQU        29
  6566. kNASetInstrumentSelect            EQU        30
  6567. kNALastSelector                    EQU        31
  6568.  
  6569. ; typedef ComponentInstance  NoteAllocator
  6570.  
  6571. kPickDontMix                    EQU        1                    ; dont mix instruments with drum sounds 
  6572. kPickSameSynth                    EQU        2                    ; only allow the same device that went in, to come out 
  6573.  
  6574. kNoteAllocatorType                EQU        'nota'
  6575.  
  6576. ;--------------------------------
  6577. ;    Note Allocator Prototypes
  6578. ;--------------------------------
  6579. ;
  6580. ; * System Configuration
  6581. ;
  6582. ; pascal ComponentResult NARegisterMusicDevice(NoteAllocator na, OSType synthType, Str31 name, SynthesizerConnections *connections)
  6583. ;
  6584.     IF ¬ GENERATINGCFM THEN
  6585.         Macro
  6586.         _NARegisterMusicDevice
  6587.             dc.w     $2F3C
  6588.             dc.w     $000C
  6589.             dc.w     $0000
  6590.             moveq    #0,d0
  6591.             dc.w     $A82A
  6592.         EndM
  6593.     ELSE
  6594.         IMPORT_CFM_FUNCTION    NARegisterMusicDevice
  6595.     ENDIF
  6596.  
  6597. ;
  6598. ; pascal ComponentResult NAUnregisterMusicDevice(NoteAllocator na, long index)
  6599. ;
  6600.     IF ¬ GENERATINGCFM THEN
  6601.         Macro
  6602.         _NAUnregisterMusicDevice
  6603.             dc.w     $2F3C
  6604.             dc.w     $0004
  6605.             dc.w     $0001
  6606.             moveq    #0,d0
  6607.             dc.w     $A82A
  6608.         EndM
  6609.     ELSE
  6610.         IMPORT_CFM_FUNCTION    NAUnregisterMusicDevice
  6611.     ENDIF
  6612.  
  6613. ;
  6614. ; pascal ComponentResult NAGetRegisteredMusicDevice(NoteAllocator na, long index, OSType *synthType, Str31 name, SynthesizerConnections *connections, MusicComponent *mc)
  6615. ;
  6616.     IF ¬ GENERATINGCFM THEN
  6617.         Macro
  6618.         _NAGetRegisteredMusicDevice
  6619.             dc.w     $2F3C
  6620.             dc.w     $0014
  6621.             dc.w     $0002
  6622.             moveq    #0,d0
  6623.             dc.w     $A82A
  6624.         EndM
  6625.     ELSE
  6626.         IMPORT_CFM_FUNCTION    NAGetRegisteredMusicDevice
  6627.     ENDIF
  6628.  
  6629. ;
  6630. ; pascal ComponentResult NASetDefaultMIDIInput(NoteAllocator na, SynthesizerConnections *sc)
  6631. ;
  6632.     IF ¬ GENERATINGCFM THEN
  6633.         Macro
  6634.         _NASetDefaultMIDIInput
  6635.             dc.w     $2F3C
  6636.             dc.w     $0004
  6637.             dc.w     $0015
  6638.             moveq    #0,d0
  6639.             dc.w     $A82A
  6640.         EndM
  6641.     ELSE
  6642.         IMPORT_CFM_FUNCTION    NASetDefaultMIDIInput
  6643.     ENDIF
  6644.  
  6645. ;
  6646. ; pascal ComponentResult NAGetDefaultMIDIInput(NoteAllocator na, SynthesizerConnections *sc)
  6647. ;
  6648.     IF ¬ GENERATINGCFM THEN
  6649.         Macro
  6650.         _NAGetDefaultMIDIInput
  6651.             dc.w     $2F3C
  6652.             dc.w     $0004
  6653.             dc.w     $0016
  6654.             moveq    #0,d0
  6655.             dc.w     $A82A
  6656.         EndM
  6657.     ELSE
  6658.         IMPORT_CFM_FUNCTION    NAGetDefaultMIDIInput
  6659.     ENDIF
  6660.  
  6661. ;
  6662. ; pascal ComponentResult NASaveMusicConfiguration(NoteAllocator na)
  6663. ;
  6664.     IF ¬ GENERATINGCFM THEN
  6665.         Macro
  6666.         _NASaveMusicConfiguration
  6667.             dc.w     $2F3C
  6668.             dc.w     $0000
  6669.             dc.w     $0003
  6670.             moveq    #0,d0
  6671.             dc.w     $A82A
  6672.         EndM
  6673.     ELSE
  6674.         IMPORT_CFM_FUNCTION    NASaveMusicConfiguration
  6675.     ENDIF
  6676.  
  6677. ;
  6678. ; * Allocation
  6679. ;
  6680. ; pascal ComponentResult NANewNoteChannel(NoteAllocator na, NoteRequest *noteRequest, NoteChannel *outChannel)
  6681. ;
  6682.     IF ¬ GENERATINGCFM THEN
  6683.         Macro
  6684.         _NANewNoteChannel
  6685.             dc.w     $2F3C
  6686.             dc.w     $0008
  6687.             dc.w     $0004
  6688.             moveq    #0,d0
  6689.             dc.w     $A82A
  6690.         EndM
  6691.     ELSE
  6692.         IMPORT_CFM_FUNCTION    NANewNoteChannel
  6693.     ENDIF
  6694.  
  6695. ;
  6696. ; pascal ComponentResult NADisposeNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6697. ;
  6698.     IF ¬ GENERATINGCFM THEN
  6699.         Macro
  6700.         _NADisposeNoteChannel
  6701.             dc.w     $2F3C
  6702.             dc.w     $0004
  6703.             dc.w     $0005
  6704.             moveq    #0,d0
  6705.             dc.w     $A82A
  6706.         EndM
  6707.     ELSE
  6708.         IMPORT_CFM_FUNCTION    NADisposeNoteChannel
  6709.     ENDIF
  6710.  
  6711. ;
  6712. ; pascal ComponentResult NAGetNoteChannelInfo(NoteAllocator na, NoteChannel noteChannel, long *index, long *part)
  6713. ;
  6714.     IF ¬ GENERATINGCFM THEN
  6715.         Macro
  6716.         _NAGetNoteChannelInfo
  6717.             dc.w     $2F3C
  6718.             dc.w     $000C
  6719.             dc.w     $0006
  6720.             moveq    #0,d0
  6721.             dc.w     $A82A
  6722.         EndM
  6723.     ELSE
  6724.         IMPORT_CFM_FUNCTION    NAGetNoteChannelInfo
  6725.     ENDIF
  6726.  
  6727. ;
  6728. ; pascal ComponentResult NAUseDefaultMIDIInput(NoteAllocator na, MusicMIDIReadHookUPP readHook, long refCon, unsigned long flags)
  6729. ;
  6730.     IF ¬ GENERATINGCFM THEN
  6731.         Macro
  6732.         _NAUseDefaultMIDIInput
  6733.             dc.w     $2F3C
  6734.             dc.w     $000C
  6735.             dc.w     $0019
  6736.             moveq    #0,d0
  6737.             dc.w     $A82A
  6738.         EndM
  6739.     ELSE
  6740.         IMPORT_CFM_FUNCTION    NAUseDefaultMIDIInput
  6741.     ENDIF
  6742.  
  6743. ;
  6744. ; pascal ComponentResult NALoseDefaultMIDIInput(NoteAllocator na)
  6745. ;
  6746.     IF ¬ GENERATINGCFM THEN
  6747.         Macro
  6748.         _NALoseDefaultMIDIInput
  6749.             dc.w     $2F3C
  6750.             dc.w     $0000
  6751.             dc.w     $001A
  6752.             moveq    #0,d0
  6753.             dc.w     $A82A
  6754.         EndM
  6755.     ELSE
  6756.         IMPORT_CFM_FUNCTION    NALoseDefaultMIDIInput
  6757.     ENDIF
  6758.  
  6759. ;
  6760. ; * Setup
  6761. ;
  6762. ; pascal ComponentResult NAPrerollNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6763. ;
  6764.     IF ¬ GENERATINGCFM THEN
  6765.         Macro
  6766.         _NAPrerollNoteChannel
  6767.             dc.w     $2F3C
  6768.             dc.w     $0004
  6769.             dc.w     $0007
  6770.             moveq    #0,d0
  6771.             dc.w     $A82A
  6772.         EndM
  6773.     ELSE
  6774.         IMPORT_CFM_FUNCTION    NAPrerollNoteChannel
  6775.     ENDIF
  6776.  
  6777. ;
  6778. ; pascal ComponentResult NAUnrollNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6779. ;
  6780.     IF ¬ GENERATINGCFM THEN
  6781.         Macro
  6782.         _NAUnrollNoteChannel
  6783.             dc.w     $2F3C
  6784.             dc.w     $0004
  6785.             dc.w     $0008
  6786.             moveq    #0,d0
  6787.             dc.w     $A82A
  6788.         EndM
  6789.     ELSE
  6790.         IMPORT_CFM_FUNCTION    NAUnrollNoteChannel
  6791.     ENDIF
  6792.  
  6793. ;
  6794. ; pascal ComponentResult NAEngageNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6795. ;
  6796.     IF ¬ GENERATINGCFM THEN
  6797.         Macro
  6798.         _NAEngageNoteChannel
  6799.             dc.w     $2F3C
  6800.             dc.w     $0004
  6801.             dc.w     $0009
  6802.             moveq    #0,d0
  6803.             dc.w     $A82A
  6804.         EndM
  6805.     ELSE
  6806.         IMPORT_CFM_FUNCTION    NAEngageNoteChannel
  6807.     ENDIF
  6808.  
  6809. ;
  6810. ; pascal ComponentResult NADisengageNoteChannel(NoteAllocator na, NoteChannel noteChannel, long silenceNotes)
  6811. ;
  6812.     IF ¬ GENERATINGCFM THEN
  6813.         Macro
  6814.         _NADisengageNoteChannel
  6815.             dc.w     $2F3C
  6816.             dc.w     $0008
  6817.             dc.w     $000A
  6818.             moveq    #0,d0
  6819.             dc.w     $A82A
  6820.         EndM
  6821.     ELSE
  6822.         IMPORT_CFM_FUNCTION    NADisengageNoteChannel
  6823.     ENDIF
  6824.  
  6825. ;
  6826. ; pascal ComponentResult NAGetNoteChannelState(NoteAllocator na, NoteChannel noteChannel, long instrumentNumber, Handle *state)
  6827. ;
  6828.     IF ¬ GENERATINGCFM THEN
  6829.         Macro
  6830.         _NAGetNoteChannelState
  6831.             dc.w     $2F3C
  6832.             dc.w     $000C
  6833.             dc.w     $0017
  6834.             moveq    #0,d0
  6835.             dc.w     $A82A
  6836.         EndM
  6837.     ELSE
  6838.         IMPORT_CFM_FUNCTION    NAGetNoteChannelState
  6839.     ENDIF
  6840.  
  6841. ;
  6842. ; pascal ComponentResult NASetNoteChannelState(NoteAllocator na, NoteChannel noteChannel, long instrumentNumber, Handle state)
  6843. ;
  6844.     IF ¬ GENERATINGCFM THEN
  6845.         Macro
  6846.         _NASetNoteChannelState
  6847.             dc.w     $2F3C
  6848.             dc.w     $000C
  6849.             dc.w     $0018
  6850.             moveq    #0,d0
  6851.             dc.w     $A82A
  6852.         EndM
  6853.     ELSE
  6854.         IMPORT_CFM_FUNCTION    NASetNoteChannelState
  6855.     ENDIF
  6856.  
  6857. ;
  6858. ; pascal ComponentResult NAResetNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6859. ;
  6860.     IF ¬ GENERATINGCFM THEN
  6861.         Macro
  6862.         _NAResetNoteChannel
  6863.             dc.w     $2F3C
  6864.             dc.w     $0004
  6865.             dc.w     $000C
  6866.             moveq    #0,d0
  6867.             dc.w     $A82A
  6868.         EndM
  6869.     ELSE
  6870.         IMPORT_CFM_FUNCTION    NAResetNoteChannel
  6871.     ENDIF
  6872.  
  6873. ;
  6874. ; pascal ComponentResult NASetNoteChannelVolume(NoteAllocator na, NoteChannel noteChannel, Fixed volume)
  6875. ;
  6876.     IF ¬ GENERATINGCFM THEN
  6877.         Macro
  6878.         _NASetNoteChannelVolume
  6879.             dc.w     $2F3C
  6880.             dc.w     $0008
  6881.             dc.w     $000B
  6882.             moveq    #0,d0
  6883.             dc.w     $A82A
  6884.         EndM
  6885.     ELSE
  6886.         IMPORT_CFM_FUNCTION    NASetNoteChannelVolume
  6887.     ENDIF
  6888.  
  6889. ;
  6890. ; pascal ComponentResult NASetInstrument(NoteAllocator na, NoteChannel noteChannel, InstrumentData *instrumentData)
  6891. ;
  6892.     IF ¬ GENERATINGCFM THEN
  6893.         Macro
  6894.         _NASetInstrument
  6895.             dc.w     $2F3C
  6896.             dc.w     $0008
  6897.             dc.w     $001E
  6898.             moveq    #0,d0
  6899.             dc.w     $A82A
  6900.         EndM
  6901.     ELSE
  6902.         IMPORT_CFM_FUNCTION    NASetInstrument
  6903.     ENDIF
  6904.  
  6905. ;
  6906. ; pascal ComponentResult NASetFlatInstrument(NoteAllocator na, NoteChannel noteChannel, FlatInstrument *flatInstrument)
  6907. ;
  6908.     IF ¬ GENERATINGCFM THEN
  6909.         Macro
  6910.         _NASetFlatInstrument
  6911.             dc.w     $2F3C
  6912.             dc.w     $0008
  6913.             dc.w     $001D
  6914.             moveq    #0,d0
  6915.             dc.w     $A82A
  6916.         EndM
  6917.     ELSE
  6918.         IMPORT_CFM_FUNCTION    NASetFlatInstrument
  6919.     ENDIF
  6920.  
  6921. ;
  6922. ; * Control
  6923. ;
  6924. ; pascal ComponentResult NAPlayNote(NoteAllocator na, NoteChannel noteChannel, long pitch, long velocity)
  6925. ;
  6926.     IF ¬ GENERATINGCFM THEN
  6927.         Macro
  6928.         _NAPlayNote
  6929.             dc.w     $2F3C
  6930.             dc.w     $000C
  6931.             dc.w     $000D
  6932.             moveq    #0,d0
  6933.             dc.w     $A82A
  6934.         EndM
  6935.     ELSE
  6936.         IMPORT_CFM_FUNCTION    NAPlayNote
  6937.     ENDIF
  6938.  
  6939. ;
  6940. ; pascal ComponentResult NASetController(NoteAllocator na, NoteChannel noteChannel, long controllerNumber, long controllerValue)
  6941. ;
  6942.     IF ¬ GENERATINGCFM THEN
  6943.         Macro
  6944.         _NASetController
  6945.             dc.w     $2F3C
  6946.             dc.w     $000C
  6947.             dc.w     $000E
  6948.             moveq    #0,d0
  6949.             dc.w     $A82A
  6950.         EndM
  6951.     ELSE
  6952.         IMPORT_CFM_FUNCTION    NASetController
  6953.     ENDIF
  6954.  
  6955. ;
  6956. ; pascal ComponentResult NASetKnob(NoteAllocator na, NoteChannel noteChannel, long knobNumber, long knobValue)
  6957. ;
  6958.     IF ¬ GENERATINGCFM THEN
  6959.         Macro
  6960.         _NASetKnob
  6961.             dc.w     $2F3C
  6962.             dc.w     $000C
  6963.             dc.w     $000F
  6964.             moveq    #0,d0
  6965.             dc.w     $A82A
  6966.         EndM
  6967.     ELSE
  6968.         IMPORT_CFM_FUNCTION    NASetKnob
  6969.     ENDIF
  6970.  
  6971. ;
  6972. ; pascal ComponentResult NAFindNoteChannelTone(NoteAllocator na, NoteChannel noteChannel, ToneDescription *td, long *instrumentNumber)
  6973. ;
  6974.     IF ¬ GENERATINGCFM THEN
  6975.         Macro
  6976.         _NAFindNoteChannelTone
  6977.             dc.w     $2F3C
  6978.             dc.w     $000C
  6979.             dc.w     $0010
  6980.             moveq    #0,d0
  6981.             dc.w     $A82A
  6982.         EndM
  6983.     ELSE
  6984.         IMPORT_CFM_FUNCTION    NAFindNoteChannelTone
  6985.     ENDIF
  6986.  
  6987. ;
  6988. ; pascal ComponentResult NASetNoteChannelInstrument(NoteAllocator na, NoteChannel noteChannel, long instrumentNumber)
  6989. ;
  6990.     IF ¬ GENERATINGCFM THEN
  6991.         Macro
  6992.         _NASetNoteChannelInstrument
  6993.             dc.w     $2F3C
  6994.             dc.w     $0008
  6995.             dc.w     $0011
  6996.             moveq    #0,d0
  6997.             dc.w     $A82A
  6998.         EndM
  6999.     ELSE
  7000.         IMPORT_CFM_FUNCTION    NASetNoteChannelInstrument
  7001.     ENDIF
  7002.  
  7003. ;
  7004. ; * User Interface
  7005. ;
  7006. ; pascal ComponentResult NAPickInstrument(NoteAllocator na, ModalFilterUPP filterProc, StringPtr prompt, ToneDescription *sd, unsigned long flags, long refCon, Ptr *flatList, long *flatChoiceIndex)
  7007. ;
  7008.     IF ¬ GENERATINGCFM THEN
  7009.         Macro
  7010.         _NAPickInstrument
  7011.             dc.w     $2F3C
  7012.             dc.w     $001C
  7013.             dc.w     $0012
  7014.             moveq    #0,d0
  7015.             dc.w     $A82A
  7016.         EndM
  7017.     ELSE
  7018.         IMPORT_CFM_FUNCTION    NAPickInstrument
  7019.     ENDIF
  7020.  
  7021. ;
  7022. ; pascal ComponentResult NAStuffToneDescription(NoteAllocator na, long gmNumber, ToneDescription *td)
  7023. ;
  7024.     IF ¬ GENERATINGCFM THEN
  7025.         Macro
  7026.         _NAStuffToneDescription
  7027.             dc.w     $2F3C
  7028.             dc.w     $0008
  7029.             dc.w     $001B
  7030.             moveq    #0,d0
  7031.             dc.w     $A82A
  7032.         EndM
  7033.     ELSE
  7034.         IMPORT_CFM_FUNCTION    NAStuffToneDescription
  7035.     ENDIF
  7036.  
  7037. ;
  7038. ; pascal ComponentResult NAPickArrangement(NoteAllocator na, ModalFilterUPP filterProc, StringPtr prompt, long partCount, NoteRequest *noteRequestList, Track t, StringPtr songName)
  7039. ;
  7040.     IF ¬ GENERATINGCFM THEN
  7041.         Macro
  7042.         _NAPickArrangement
  7043.             dc.w     $2F3C
  7044.             dc.w     $0018
  7045.             dc.w     $0013
  7046.             moveq    #0,d0
  7047.             dc.w     $A82A
  7048.         EndM
  7049.     ELSE
  7050.         IMPORT_CFM_FUNCTION    NAPickArrangement
  7051.     ENDIF
  7052.  
  7053. ;
  7054. ; pascal ComponentResult NACopyrightDialog(NoteAllocator na, PicHandle p, StringPtr author, StringPtr copyright, StringPtr other, StringPtr title, ModalFilterUPP filterProc, long refCon)
  7055. ;
  7056.     IF ¬ GENERATINGCFM THEN
  7057.         Macro
  7058.         _NACopyrightDialog
  7059.             dc.w     $2F3C
  7060.             dc.w     $001C
  7061.             dc.w     $001C
  7062.             moveq    #0,d0
  7063.             dc.w     $A82A
  7064.         EndM
  7065.     ELSE
  7066.         IMPORT_CFM_FUNCTION    NACopyrightDialog
  7067.     ENDIF
  7068.  
  7069. ;
  7070. ; * Note Allocator interior views
  7071. NAStatPiece             RECORD    0
  7072. clientName                 ds.l   8        ; offset: $0 (0)
  7073. synthesizerName             ds.l   8        ; offset: $20 (32)
  7074. part                     ds.l   1        ; offset: $40 (64)
  7075. midiChannel                 ds.l   1        ; offset: $44 (68)
  7076. polyphony                 ds.l   1        ; offset: $48 (72)
  7077. valid                     ds.l   1        ; offset: $4C (76)
  7078. sizeof                     EQU *            ; size:   $50 (80)
  7079.                         ENDR
  7080.  
  7081. ; typedef struct NAStatPiece  NAStatPiece
  7082. NAStat                     RECORD    0
  7083. pieceCount                 ds.l   1        ; offset: $0 (0)
  7084. piece                     ds.b   64 * NAStatPiece.sizeof ; offset: $4 (4)
  7085. sizeof                     EQU *            ; size:   $1404 (5124)
  7086.                         ENDR
  7087.  
  7088. ; typedef struct NAStat     NAStat
  7089. ;
  7090. ; pascal ComponentResult NAGetStatusBlock(NoteAllocator na, NAStat *stat)
  7091. ;
  7092.     IF ¬ GENERATINGCFM THEN
  7093.         Macro
  7094.         _NAGetStatusBlock
  7095.             dc.w     $2F3C
  7096.             dc.w     $0004
  7097.             dc.w     $0014
  7098.             moveq    #0,d0
  7099.             dc.w     $A82A
  7100.         EndM
  7101.     ELSE
  7102.         IMPORT_CFM_FUNCTION    NAGetStatusBlock
  7103.     ENDIF
  7104.  
  7105. ;--------------------------
  7106. ;    Types
  7107. ;--------------------------
  7108.  
  7109. kTuneQueueDepth                    EQU        8                    ; Deepest you can queue tune segments 
  7110.  
  7111. TuneStatus                 RECORD    0
  7112. tune                     ds.l   1        ; offset: $0 (0)        ; currently playing tune 
  7113. tunePtr                     ds.l   1        ; offset: $4 (4)        ; position within currently playing piece 
  7114. time                     ds.l   1        ; offset: $8 (8)        ; current tune time 
  7115. queueCount                 ds.w   1        ; offset: $C (12)        ; how many pieces queued up? 
  7116. queueSpots                 ds.w   1        ; offset: $E (14)        ; How many more tunepieces can be queued 
  7117. queueTime                 ds.l   1        ; offset: $10 (16)        ; How much time is queued up? (can be very inaccurate) 
  7118. reserved                 ds.l   3        ; offset: $14 (20)
  7119. sizeof                     EQU *            ; size:   $20 (32)
  7120.                         ENDR
  7121.  
  7122. ; typedef struct TuneStatus  TuneStatus
  7123.  
  7124. kStopTuneFade                    EQU        1                    ; do a quick, synchronous fadeout 
  7125. kStopTuneSustain                EQU        2                    ; don't silece notes 
  7126. kStopTuneInstant                EQU        4                    ; silence notes fast (else, decay them) 
  7127. kStopTuneReleaseChannels        EQU        8                    ; afterwards, let the channels go 
  7128.  
  7129. kTuneSelect                        EQU        3
  7130. kTuneSetHeaderSelect            EQU        4
  7131. kTuneGetTimeBaseSelect            EQU        5
  7132. kTuneSetTimeScaleSelect            EQU        6
  7133. kTuneGetTimeScaleSelect            EQU        7
  7134. kTuneGetIndexedNoteChannelSelect EQU        8
  7135. kTuneDummy                        EQU        9
  7136. kTuneQueueSelect                EQU        10
  7137. kTuneInstantSelect                EQU        11
  7138. kTuneGetStatusSelect            EQU        12
  7139. kTuneStopSelect                    EQU        13
  7140. kTuneResumeSelect                EQU        14
  7141. kTuneFlushSelect                EQU        15
  7142. kTuneSetVolumeSelect            EQU        16
  7143. kTuneGetVolumeSelect            EQU        17
  7144. kTunePrerollSelect                EQU        18
  7145. kTuneUnrollSelect                EQU        19
  7146. kTuneLastSelector                EQU        20
  7147.  
  7148. ; typedef ComponentInstance  TunePlayer
  7149.  
  7150. kMaxTunePlayerParts                EQU        32
  7151. kTunePlayerType                    EQU        'tune'
  7152.  
  7153. ;--------------------------
  7154. ;    Prototypes
  7155. ;--------------------------
  7156. ;
  7157. ; pascal ComponentResult TuneSetHeader(TunePlayer tp, unsigned long *header)
  7158. ;
  7159.     IF ¬ GENERATINGCFM THEN
  7160.         Macro
  7161.         _TuneSetHeader
  7162.             dc.w     $2F3C
  7163.             dc.w     $0004
  7164.             dc.w     $0004
  7165.             moveq    #0,d0
  7166.             dc.w     $A82A
  7167.         EndM
  7168.     ELSE
  7169.         IMPORT_CFM_FUNCTION    TuneSetHeader
  7170.     ENDIF
  7171.  
  7172. ;
  7173. ; pascal ComponentResult TuneGetTimeBase(TunePlayer tp, TimeBase *tb)
  7174. ;
  7175.     IF ¬ GENERATINGCFM THEN
  7176.         Macro
  7177.         _TuneGetTimeBase
  7178.             dc.w     $2F3C
  7179.             dc.w     $0004
  7180.             dc.w     $0005
  7181.             moveq    #0,d0
  7182.             dc.w     $A82A
  7183.         EndM
  7184.     ELSE
  7185.         IMPORT_CFM_FUNCTION    TuneGetTimeBase
  7186.     ENDIF
  7187.  
  7188. ;
  7189. ; pascal ComponentResult TuneSetTimeScale(TunePlayer tp, TimeScale scale)
  7190. ;
  7191.     IF ¬ GENERATINGCFM THEN
  7192.         Macro
  7193.         _TuneSetTimeScale
  7194.             dc.w     $2F3C
  7195.             dc.w     $0004
  7196.             dc.w     $0006
  7197.             moveq    #0,d0
  7198.             dc.w     $A82A
  7199.         EndM
  7200.     ELSE
  7201.         IMPORT_CFM_FUNCTION    TuneSetTimeScale
  7202.     ENDIF
  7203.  
  7204. ;
  7205. ; pascal ComponentResult TuneGetTimeScale(TunePlayer tp, TimeScale *scale)
  7206. ;
  7207.     IF ¬ GENERATINGCFM THEN
  7208.         Macro
  7209.         _TuneGetTimeScale
  7210.             dc.w     $2F3C
  7211.             dc.w     $0004
  7212.             dc.w     $0007
  7213.             moveq    #0,d0
  7214.             dc.w     $A82A
  7215.         EndM
  7216.     ELSE
  7217.         IMPORT_CFM_FUNCTION    TuneGetTimeScale
  7218.     ENDIF
  7219.  
  7220. ;
  7221. ; pascal ComponentResult TuneGetIndexedNoteChannel(TunePlayer tp, long i, NoteChannel *nc)
  7222. ;
  7223.     IF ¬ GENERATINGCFM THEN
  7224.         Macro
  7225.         _TuneGetIndexedNoteChannel
  7226.             dc.w     $2F3C
  7227.             dc.w     $0008
  7228.             dc.w     $0008
  7229.             moveq    #0,d0
  7230.             dc.w     $A82A
  7231.         EndM
  7232.     ELSE
  7233.         IMPORT_CFM_FUNCTION    TuneGetIndexedNoteChannel
  7234.     ENDIF
  7235.  
  7236. ; Values for when to start. 
  7237. kTuneStartNow                    EQU        1                    ; start after buffer is implied 
  7238. kTuneDontClipNotes                EQU        2                    ; allow notes to finish their durations outside sample 
  7239. kTuneExcludeEdgeNotes            EQU        4                    ; dont play notes that start at end of tune 
  7240. kTuneStartNewMaster                EQU        16384
  7241.  
  7242. ;
  7243. ; pascal ComponentResult TuneQueue(TunePlayer tp, unsigned long *tune, Fixed tuneRate, unsigned long tuneStartPosition, unsigned long tuneStopPosition, unsigned long queueFlags, TuneCallBackUPP callBackProc, long refCon)
  7244. ;
  7245.     IF ¬ GENERATINGCFM THEN
  7246.         Macro
  7247.         _TuneQueue
  7248.             dc.w     $2F3C
  7249.             dc.w     $001C
  7250.             dc.w     $000A
  7251.             moveq    #0,d0
  7252.             dc.w     $A82A
  7253.         EndM
  7254.     ELSE
  7255.         IMPORT_CFM_FUNCTION    TuneQueue
  7256.     ENDIF
  7257.  
  7258. ;
  7259. ; pascal ComponentResult TuneInstant(TunePlayer tp, unsigned long *tune, long tunePosition)
  7260. ;
  7261.     IF ¬ GENERATINGCFM THEN
  7262.         Macro
  7263.         _TuneInstant
  7264.             dc.w     $2F3C
  7265.             dc.w     $0008
  7266.             dc.w     $000B
  7267.             moveq    #0,d0
  7268.             dc.w     $A82A
  7269.         EndM
  7270.     ELSE
  7271.         IMPORT_CFM_FUNCTION    TuneInstant
  7272.     ENDIF
  7273.  
  7274. ;
  7275. ; pascal ComponentResult TuneGetStatus(TunePlayer tp, TuneStatus *status)
  7276. ;
  7277.     IF ¬ GENERATINGCFM THEN
  7278.         Macro
  7279.         _TuneGetStatus
  7280.             dc.w     $2F3C
  7281.             dc.w     $0004
  7282.             dc.w     $000C
  7283.             moveq    #0,d0
  7284.             dc.w     $A82A
  7285.         EndM
  7286.     ELSE
  7287.         IMPORT_CFM_FUNCTION    TuneGetStatus
  7288.     ENDIF
  7289.  
  7290. ; Values for when to start. 
  7291. kStopSustain                    EQU        1                    ; Leaves notes playing, not silent 
  7292. kStopFadeout                    EQU        2                    ; Does a synchronous fade-out 
  7293.  
  7294. ;
  7295. ; pascal ComponentResult TuneStop(TunePlayer tp, long stopFlags)
  7296. ;
  7297.     IF ¬ GENERATINGCFM THEN
  7298.         Macro
  7299.         _TuneStop
  7300.             dc.w     $2F3C
  7301.             dc.w     $0004
  7302.             dc.w     $000D
  7303.             moveq    #0,d0
  7304.             dc.w     $A82A
  7305.         EndM
  7306.     ELSE
  7307.         IMPORT_CFM_FUNCTION    TuneStop
  7308.     ENDIF
  7309.  
  7310. ;
  7311. ; pascal ComponentResult TuneResume(TunePlayer tp)
  7312. ;
  7313.     IF ¬ GENERATINGCFM THEN
  7314.         Macro
  7315.         _TuneResume
  7316.             dc.w     $2F3C
  7317.             dc.w     $0000
  7318.             dc.w     $000E
  7319.             moveq    #0,d0
  7320.             dc.w     $A82A
  7321.         EndM
  7322.     ELSE
  7323.         IMPORT_CFM_FUNCTION    TuneResume
  7324.     ENDIF
  7325.  
  7326. ;
  7327. ; pascal ComponentResult TuneFlush(TunePlayer tp)
  7328. ;
  7329.     IF ¬ GENERATINGCFM THEN
  7330.         Macro
  7331.         _TuneFlush
  7332.             dc.w     $2F3C
  7333.             dc.w     $0000
  7334.             dc.w     $000F
  7335.             moveq    #0,d0
  7336.             dc.w     $A82A
  7337.         EndM
  7338.     ELSE
  7339.         IMPORT_CFM_FUNCTION    TuneFlush
  7340.     ENDIF
  7341.  
  7342. ;
  7343. ; pascal ComponentResult TuneSetVolume(TunePlayer tp, Fixed volume)
  7344. ;
  7345.     IF ¬ GENERATINGCFM THEN
  7346.         Macro
  7347.         _TuneSetVolume
  7348.             dc.w     $2F3C
  7349.             dc.w     $0004
  7350.             dc.w     $0010
  7351.             moveq    #0,d0
  7352.             dc.w     $A82A
  7353.         EndM
  7354.     ELSE
  7355.         IMPORT_CFM_FUNCTION    TuneSetVolume
  7356.     ENDIF
  7357.  
  7358. ;
  7359. ; pascal ComponentResult TuneGetVolume(TunePlayer tp)
  7360. ;
  7361.     IF ¬ GENERATINGCFM THEN
  7362.         Macro
  7363.         _TuneGetVolume
  7364.             dc.w     $2F3C
  7365.             dc.w     $0000
  7366.             dc.w     $0011
  7367.             moveq    #0,d0
  7368.             dc.w     $A82A
  7369.         EndM
  7370.     ELSE
  7371.         IMPORT_CFM_FUNCTION    TuneGetVolume
  7372.     ENDIF
  7373.  
  7374. ;
  7375. ; pascal ComponentResult TunePreroll(TunePlayer tp)
  7376. ;
  7377.     IF ¬ GENERATINGCFM THEN
  7378.         Macro
  7379.         _TunePreroll
  7380.             dc.w     $2F3C
  7381.             dc.w     $0000
  7382.             dc.w     $0012
  7383.             moveq    #0,d0
  7384.             dc.w     $A82A
  7385.         EndM
  7386.     ELSE
  7387.         IMPORT_CFM_FUNCTION    TunePreroll
  7388.     ENDIF
  7389.  
  7390. ;
  7391. ; pascal ComponentResult TuneUnroll(TunePlayer tp)
  7392. ;
  7393.     IF ¬ GENERATINGCFM THEN
  7394.         Macro
  7395.         _TuneUnroll
  7396.             dc.w     $2F3C
  7397.             dc.w     $0000
  7398.             dc.w     $0013
  7399.             moveq    #0,d0
  7400.             dc.w     $A82A
  7401.         EndM
  7402.     ELSE
  7403.         IMPORT_CFM_FUNCTION    TuneUnroll
  7404.     ENDIF
  7405.  
  7406. ; typedef unsigned long     MusicOpWord, *MusicOpWordPtr
  7407. ;     QuickTime Music Track Event Formats:
  7408. ;
  7409. ;    At this time, QuickTime music tracks support 5 different event types -- REST events,
  7410. ;    short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events, 
  7411. ;    long CONTROL events, and variable GENERAL events.
  7412. ;        • REST Event (4 bytes/event):
  7413. ;    
  7414. ;            (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
  7415. ;        
  7416. ;        • Short NOTE Events (4 bytes/event):
  7417. ;    
  7418. ;            (0 0 1) (5-bit Instrument) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
  7419. ;        
  7420. ;            where:    Pitch is offset by 32 (Actual pitch = pitch field + 32)
  7421. ;
  7422. ;        • Short CONTROL Events (4 bytes/event):
  7423. ;    
  7424. ;            (0 1 0) (5-bit Instrument) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
  7425. ;                                                                         ( or 15-bit Signed Value)
  7426. ;        • Short GENERAL Event (4 bytes/event):
  7427. ;    
  7428. ;            (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
  7429. ;    
  7430. ;        • Long NOTE Events (8 bytes/event):
  7431. ;    
  7432. ;            (1 0 0 1) (12-bit Instrument) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
  7433. ;            (1 0) (8-bit UNUSED) (22-bit Duration)
  7434. ;        
  7435. ;        • Long CONTROL Event (8 bytes/event):
  7436. ;        
  7437. ;            (1 0 1 0) (12-bit Instrument) (16-bit Value MSB) 
  7438. ;            (1 0) (14-bit Controller) (16-bit Value LSB)
  7439. ;    
  7440. ;        • Long KNOB Event (8 bytes/event):
  7441. ;    
  7442. ;            (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
  7443. ;            (1 0) (14-bit KNOB) (16-bit Value LSB)
  7444. ;    
  7445. ;        • Variable GENERAL Length Events (N bytes/event):
  7446. ;    
  7447. ;            (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
  7448. ;                :
  7449. ;            (32-bit Data values)
  7450. ;                :
  7451. ;            (1 1) (14-bit UNUSED) (16-bit Length)
  7452. ;    
  7453. ;            where:    Length field is the number of LONG words in the record.
  7454. ;                    Lengths include the first and last long words (Minimum length = 2)
  7455. ;                
  7456. ;    The following event type values have not been used yet and are reserved for 
  7457. ;    future expansion:
  7458. ;        
  7459. ;        • (1 0 0 0)        (8 bytes/event)
  7460. ;        • (1 1 0 0)        (N bytes/event)
  7461. ;        • (1 1 0 1)        (N bytes/event)
  7462. ;        • (1 1 1 0)        (N bytes/event)
  7463. ;        
  7464. ;    For all events, the following generalizations apply:
  7465. ;    
  7466. ;        -    All duration values are specified in Millisecond units.
  7467. ;        -     Pitch values are intended to map directly to the MIDI key numbers.
  7468. ;        -    Controllers from 0 to 127 correspond to the standard MIDI controllers.
  7469. ;            Controllers greater than 127 correspond to other controls (i.e., Pitch Bend, 
  7470. ;            Key Pressure, and Channel Pressure).    
  7471. ;
  7472. ; Defines for the implemented music event data fields
  7473.  
  7474. kRestEventType                    EQU        $0                    ; lower 3-bits 
  7475. kNoteEventType                    EQU        $1                    ; lower 3-bits 
  7476. kControlEventType                EQU        $2                    ; lower 3-bits 
  7477. kMarkerEventType                EQU        $3                    ; lower 3-bits 
  7478. kUndefined1EventType            EQU        $8                    ; 4-bits 
  7479. kXNoteEventType                    EQU        $9                    ; 4-bits 
  7480. kXControlEventType                EQU        $A                    ; 4-bits 
  7481. kKnobEventType                    EQU        $B                    ; 4-bits 
  7482. kUndefined2EventType            EQU        $C                    ; 4-bits 
  7483. kUndefined3EventType            EQU        $D                    ; 4-bits 
  7484. kUndefined4EventType            EQU        $E                    ; 4-bits 
  7485. kGeneralEventType                EQU        $F                    ; 4-bits 
  7486. kXEventLengthBits                EQU        $2                    ; 2 bits: indicates 8-byte event record 
  7487. kGeneralEventLengthBits            EQU        $3                    ; 2 bits: indicates variable length event record 
  7488. kEventLen                        EQU        1                    ; length of events in long words 
  7489. kXEventLen                        EQU        2
  7490. kRestEventLen                    EQU        kEventLen            ; length of events in long words 
  7491. kNoteEventLen                    EQU        kEventLen
  7492. kControlEventLen                EQU        kEventLen
  7493. kMarkerEventLen                    EQU        kEventLen
  7494. kXNoteEventLen                    EQU        kXEventLen
  7495. kXControlEventLen                EQU        kXEventLen
  7496. kGeneralEventLen                EQU        kXEventLen            ; 2 or more, however 
  7497. ; Universal Event Defines
  7498. kEventLengthFieldPos            EQU        30                    ; by looking at these two bits of the 1st or last word              
  7499. kEventLengthFieldWidth            EQU        2                    ; of an event you can determine the event length                      
  7500. ; length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length 
  7501. kEventTypeFieldPos                EQU        29                    ; event type field for short events 
  7502. kEventTypeFieldWidth            EQU        3                    ; short type is 3 bits 
  7503. kXEventTypeFieldPos                EQU        28                    ; event type field for extended events 
  7504. kXEventTypeFieldWidth            EQU        4                    ; extended type is 4 bits 
  7505. kEventInstrumentFieldPos        EQU        24
  7506. kEventInstrumentFieldWidth        EQU        5
  7507. kXEventInstrumentFieldPos        EQU        16                    ; in the 1st long word 
  7508. kXEventInstrumentFieldWidth        EQU        12
  7509. ; Rest Events
  7510. kRestEventDurationFieldPos        EQU        0
  7511. kRestEventDurationFieldWidth    EQU        24
  7512. kRestEventDurationMax            EQU        ((1 << kRestEventDurationFieldWidth) - 1)
  7513. ; Note Events
  7514. kNoteEventPitchFieldPos            EQU        18
  7515. kNoteEventPitchFieldWidth        EQU        6
  7516. kNoteEventPitchOffset            EQU        32                    ; add to value in pitch field to get actual pitch 
  7517. kNoteEventVolumeFieldPos        EQU        11
  7518. kNoteEventVolumeFieldWidth        EQU        7
  7519. kNoteEventVolumeOffset            EQU        0                    ; add to value in volume field to get actual volume 
  7520. kNoteEventDurationFieldPos        EQU        0
  7521. kNoteEventDurationFieldWidth    EQU        11
  7522. kNoteEventDurationMax            EQU        ((1 << kNoteEventDurationFieldWidth) - 1)
  7523. kXNoteEventPitchFieldPos        EQU        0                    ; in the 1st long word 
  7524. kXNoteEventPitchFieldWidth        EQU        16
  7525. kXNoteEventDurationFieldPos        EQU        0                    ; in the 2nd long word 
  7526. kXNoteEventDurationFieldWidth    EQU        22
  7527. kXNoteEventDurationMax            EQU        ((1 << kXNoteEventDurationFieldWidth) - 1)
  7528. kXNoteEventVolumeFieldPos        EQU        22                    ; in the 2nd long word 
  7529. kXNoteEventVolumeFieldWidth        EQU        7
  7530. ; Control Events
  7531. kControlEventControllerFieldPos    EQU        16
  7532. kControlEventControllerFieldWidth EQU        8
  7533. kControlEventValueFieldPos        EQU        0
  7534. kControlEventValueFieldWidth    EQU        16
  7535. kXControlEventControllerFieldPos EQU        0                    ; in the 2nd long word 
  7536. kXControlEventControllerFieldWidth EQU        16
  7537. kXControlEventValueFieldPos        EQU        0                    ; in the 1st long word 
  7538. kXControlEventValueFieldWidth    EQU        16
  7539. ; Knob Events
  7540. kKnobEventValueHighFieldPos        EQU        0                    ; 1st long word 
  7541. kKnobEventValueHighFieldWidth    EQU        16
  7542. kKnobEventKnobFieldPos            EQU        16                    ; 2nd long word 
  7543. kKnobEventKnobFieldWidth        EQU        14
  7544. kKnobEventValueLowFieldPos        EQU        0                    ; 2nd long word 
  7545. kKnobEventValueLowFieldWidth    EQU        16
  7546. ; Marker Events
  7547. kMarkerEventSubtypeFieldPos        EQU        16
  7548. kMarkerEventSubtypeFieldWidth    EQU        8
  7549. kMarkerEventValueFieldPos        EQU        0
  7550. kMarkerEventValueFieldWidth        EQU        16
  7551. ; General Events
  7552. kGeneralEventSubtypeFieldPos    EQU        16                    ; in the last long word 
  7553. kGeneralEventSubtypeFieldWidth    EQU        14
  7554. kGeneralEventLengthFieldPos        EQU        0                    ; in the 1st & last long words 
  7555. kGeneralEventLengthFieldWidth    EQU        16
  7556.  
  7557. kGeneralEventNoteRequest        EQU        1                    ; Encapsulates NoteRequest data structure 
  7558. kGeneralEventInstrument            EQU        2                    ; Encapsulates poly, typical poly, followed by InstrumentData record 
  7559. kGeneralEventFlatInstrument        EQU        3                    ; Encapsulates poly, typical poly, followed by FlatInstrument record 
  7560. kGeneralEventPartName            EQU        4                    ; Brackets 2 longs follwed by a pascal string (padded to long alignment) 
  7561. kGeneralEventPartKey            EQU        5                    ; Brackets 2 longs 
  7562.  
  7563. TCSourceRefNameType                EQU        'name'
  7564.  
  7565. tcDropFrame                        EQU        1 << 0
  7566. tc24HourMax                        EQU        1 << 1
  7567. tcNegTimesOK                    EQU        1 << 2
  7568. tcCounter                        EQU        1 << 3
  7569.  
  7570. TimeCodeDef             RECORD    0
  7571. flags                     ds.l   1        ; offset: $0 (0)        ; drop-frame, etc.
  7572. fTimeScale                 ds.l   1        ; offset: $4 (4)        ; time scale of frameDuration (eg. 2997)
  7573. frameDuration             ds.l   1        ; offset: $8 (8)        ; duration of each frame (eg. 100)
  7574. numFrames                 ds.b   1        ; offset: $C (12)        ; number of frames per second for timecode (eg. 30)
  7575. ; number of frames per tick for counter mode
  7576. padding                     ds.b   1        ; offset: $D (13)        ; unused padding byte 
  7577. sizeof                     EQU *            ; size:   $E (14)
  7578.                         ENDR
  7579.  
  7580. ; typedef struct TimeCodeDef  TimeCodeDef
  7581.  
  7582. tctNegFlag                        EQU        $80                    ; negative bit is in minutes
  7583.  
  7584. TimeCodeTime             RECORD    0
  7585. hours                     ds.b   1        ; offset: $0 (0)
  7586. minutes                     ds.b   1        ; offset: $1 (1)
  7587. seconds                     ds.b   1        ; offset: $2 (2)
  7588. frames                     ds.b   1        ; offset: $3 (3)
  7589. sizeof                     EQU *            ; size:   $4 (4)
  7590.                         ENDR
  7591.  
  7592. ; typedef struct TimeCodeTime  TimeCodeTime
  7593. TimeCodeCounter         RECORD    0
  7594. counter                     ds.l   1        ; offset: $0 (0)
  7595. sizeof                     EQU *            ; size:   $4 (4)
  7596.                         ENDR
  7597.  
  7598. ; typedef struct TimeCodeCounter  TimeCodeCounter
  7599. TimeCodeDescription     RECORD    0
  7600. ; standard sample description header
  7601. descSize                 ds.l   1        ; offset: $0 (0)
  7602. dataFormat                 ds.l   1        ; offset: $4 (4)
  7603. resvd1                     ds.l   1        ; offset: $8 (8)
  7604. resvd2                     ds.w   1        ; offset: $C (12)
  7605. dataRefIndex             ds.w   1        ; offset: $E (14)
  7606. ; timecode specific stuff
  7607. flags                     ds.l   1        ; offset: $10 (16)
  7608. timeCodeDef                 ds     TimeCodeDef ; offset: $14 (20)
  7609. srcRef                     ds.l   1        ; offset: $22 (34)
  7610. sizeof                     EQU *            ; size:   $26 (38)
  7611.                         ENDR
  7612.  
  7613. ; typedef struct TimeCodeDescription  TimeCodeDescription
  7614. ; typedef TimeCodeDescription  *TimeCodeDescriptionPtr
  7615. ; typedef TimeCodeDescriptionPtr  *TimeCodeDescriptionHandle
  7616.  
  7617. tcdfShowTimeCode                EQU        1 << 0
  7618.  
  7619. kTCGetCurrentTimeCodeSelect        EQU        257
  7620. kTCGetTimeCodeAtTimeSelect        EQU        258
  7621. kTCTimeCodeToStringSelect        EQU        259
  7622. kTCTimeCodeToFrameNumberSelect    EQU        260
  7623. kTCFrameNumberToTimeCodeSelect    EQU        261
  7624. kTCGetSourceRefSelect            EQU        262
  7625. kTCSetSourceRefSelect            EQU        263
  7626. kTCSetTimeCodeFlagsSelect        EQU        264
  7627. kTCGetTimeCodeFlagsSelect        EQU        265
  7628. kTCSetDisplayOptionsSelect        EQU        266
  7629. kTCGetDisplayOptionsSelect        EQU        267
  7630.  
  7631. ;
  7632. ; pascal HandlerError TCGetCurrentTimeCode(MediaHandler mh, long *frameNum, TimeCodeDef *tcdef, TimeCodeRecord *tcrec, UserData *srcRefH)
  7633. ;
  7634.     IF ¬ GENERATINGCFM THEN
  7635.         Macro
  7636.         _TCGetCurrentTimeCode
  7637.             dc.w     $2F3C
  7638.             dc.w     $0010
  7639.             dc.w     $0101
  7640.             moveq    #0,d0
  7641.             dc.w     $A82A
  7642.         EndM
  7643.     ELSE
  7644.         IMPORT_CFM_FUNCTION    TCGetCurrentTimeCode
  7645.     ENDIF
  7646.  
  7647. ;
  7648. ; pascal HandlerError TCGetTimeCodeAtTime(MediaHandler mh, TimeValue mediaTime, long *frameNum, TimeCodeDef *tcdef, TimeCodeRecord *tcdata, UserData *srcRefH)
  7649. ;
  7650.     IF ¬ GENERATINGCFM THEN
  7651.         Macro
  7652.         _TCGetTimeCodeAtTime
  7653.             dc.w     $2F3C
  7654.             dc.w     $0014
  7655.             dc.w     $0102
  7656.             moveq    #0,d0
  7657.             dc.w     $A82A
  7658.         EndM
  7659.     ELSE
  7660.         IMPORT_CFM_FUNCTION    TCGetTimeCodeAtTime
  7661.     ENDIF
  7662.  
  7663. ;
  7664. ; pascal HandlerError TCTimeCodeToFrameNumber(MediaHandler mh, TimeCodeDef *tcdef, TimeCodeRecord *tcrec, long *frameNumber)
  7665. ;
  7666.     IF ¬ GENERATINGCFM THEN
  7667.         Macro
  7668.         _TCTimeCodeToFrameNumber
  7669.             dc.w     $2F3C
  7670.             dc.w     $000C
  7671.             dc.w     $0104
  7672.             moveq    #0,d0
  7673.             dc.w     $A82A
  7674.         EndM
  7675.     ELSE
  7676.         IMPORT_CFM_FUNCTION    TCTimeCodeToFrameNumber
  7677.     ENDIF
  7678.  
  7679. ;
  7680. ; pascal HandlerError TCFrameNumberToTimeCode(MediaHandler mh, long frameNumber, TimeCodeDef *tcdef, TimeCodeRecord *tcrec)
  7681. ;
  7682.     IF ¬ GENERATINGCFM THEN
  7683.         Macro
  7684.         _TCFrameNumberToTimeCode
  7685.             dc.w     $2F3C
  7686.             dc.w     $000C
  7687.             dc.w     $0105
  7688.             moveq    #0,d0
  7689.             dc.w     $A82A
  7690.         EndM
  7691.     ELSE
  7692.         IMPORT_CFM_FUNCTION    TCFrameNumberToTimeCode
  7693.     ENDIF
  7694.  
  7695. ;
  7696. ; pascal HandlerError TCTimeCodeToString(MediaHandler mh, TimeCodeDef *tcdef, TimeCodeRecord *tcrec, StringPtr tcStr)
  7697. ;
  7698.     IF ¬ GENERATINGCFM THEN
  7699.         Macro
  7700.         _TCTimeCodeToString
  7701.             dc.w     $2F3C
  7702.             dc.w     $000C
  7703.             dc.w     $0103
  7704.             moveq    #0,d0
  7705.             dc.w     $A82A
  7706.         EndM
  7707.     ELSE
  7708.         IMPORT_CFM_FUNCTION    TCTimeCodeToString
  7709.     ENDIF
  7710.  
  7711. ;
  7712. ; pascal HandlerError TCGetSourceRef(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData *srefH)
  7713. ;
  7714.     IF ¬ GENERATINGCFM THEN
  7715.         Macro
  7716.         _TCGetSourceRef
  7717.             dc.w     $2F3C
  7718.             dc.w     $0008
  7719.             dc.w     $0106
  7720.             moveq    #0,d0
  7721.             dc.w     $A82A
  7722.         EndM
  7723.     ELSE
  7724.         IMPORT_CFM_FUNCTION    TCGetSourceRef
  7725.     ENDIF
  7726.  
  7727. ;
  7728. ; pascal HandlerError TCSetSourceRef(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData srefH)
  7729. ;
  7730.     IF ¬ GENERATINGCFM THEN
  7731.         Macro
  7732.         _TCSetSourceRef
  7733.             dc.w     $2F3C
  7734.             dc.w     $0008
  7735.             dc.w     $0107
  7736.             moveq    #0,d0
  7737.             dc.w     $A82A
  7738.         EndM
  7739.     ELSE
  7740.         IMPORT_CFM_FUNCTION    TCSetSourceRef
  7741.     ENDIF
  7742.  
  7743. ;
  7744. ; pascal HandlerError TCSetTimeCodeFlags(MediaHandler mh, long flags, long flagsMask)
  7745. ;
  7746.     IF ¬ GENERATINGCFM THEN
  7747.         Macro
  7748.         _TCSetTimeCodeFlags
  7749.             dc.w     $2F3C
  7750.             dc.w     $0008
  7751.             dc.w     $0108
  7752.             moveq    #0,d0
  7753.             dc.w     $A82A
  7754.         EndM
  7755.     ELSE
  7756.         IMPORT_CFM_FUNCTION    TCSetTimeCodeFlags
  7757.     ENDIF
  7758.  
  7759. ;
  7760. ; pascal HandlerError TCGetTimeCodeFlags(MediaHandler mh, long *flags)
  7761. ;
  7762.     IF ¬ GENERATINGCFM THEN
  7763.         Macro
  7764.         _TCGetTimeCodeFlags
  7765.             dc.w     $2F3C
  7766.             dc.w     $0004
  7767.             dc.w     $0109
  7768.             moveq    #0,d0
  7769.             dc.w     $A82A
  7770.         EndM
  7771.     ELSE
  7772.         IMPORT_CFM_FUNCTION    TCGetTimeCodeFlags
  7773.     ENDIF
  7774.  
  7775. ;
  7776. ; pascal HandlerError TCSetDisplayOptions(MediaHandler mh, TCTextOptionsPtr textOptions)
  7777. ;
  7778.     IF ¬ GENERATINGCFM THEN
  7779.         Macro
  7780.         _TCSetDisplayOptions
  7781.             dc.w     $2F3C
  7782.             dc.w     $0004
  7783.             dc.w     $010A
  7784.             moveq    #0,d0
  7785.             dc.w     $A82A
  7786.         EndM
  7787.     ELSE
  7788.         IMPORT_CFM_FUNCTION    TCSetDisplayOptions
  7789.     ENDIF
  7790.  
  7791. ;
  7792. ; pascal HandlerError TCGetDisplayOptions(MediaHandler mh, TCTextOptionsPtr textOptions)
  7793. ;
  7794.     IF ¬ GENERATINGCFM THEN
  7795.         Macro
  7796.         _TCGetDisplayOptions
  7797.             dc.w     $2F3C
  7798.             dc.w     $0004
  7799.             dc.w     $010B
  7800.             moveq    #0,d0
  7801.             dc.w     $A82A
  7802.         EndM
  7803.     ELSE
  7804.         IMPORT_CFM_FUNCTION    TCGetDisplayOptions
  7805.     ENDIF
  7806.  
  7807. ; UPP call backs 
  7808.     ENDIF ; __QUICKTIMECOMPONENTS__
  7809.